简体   繁体   English

从iis 8.5 Windows Server 2012上的asp.net核心应用程序获取500错误代码,但在控制台上运行正常

[英]Getting 500 Error code from asp.net core app on iis 8.5 windows server 2012 but works fine on console

Headline: 标题:

Getting 500 Error Code when running asp.net core application on windows server 2012 IIS 8.5 but works fine when executed from command line by specifying the generated exe file ie "MyApplication.exe" 在Windows Server 2012 IIS 8.5上运行asp.net核心应用程序时获取500错误代码但通过指定生成的exe文件即“MyApplication.exe”从命令行执行时工作正常

Details: 细节:

Its not generating any error logs and there is nothing related to this in Windows event viewer so I am clueless what is happening. 它没有生成任何错误日志,并且在Windows事件查看器中没有任何相关内容,因此我无能为力。 I am pretty sure that problem is not in the generated package (using dotnet publish) because it is generated through TeamCity and then the same package is deployed to different machines and the process to create the host site is also automated using OctopusDeploy and this works on other machines. 我很确定问题不在生成的包中(使用dotnet发布),因为它是通过TeamCity生成的,然后将相同的包部署到不同的机器上,并且使用OctopusDeploy自动创建主机站点的过程也可以使用其他机器。 Things which are different on the machine where it is not working are: 机器不工作的不同之处是:

  • It had dotnet-core RC1 installed (which I uninstalled before deployment process) 它安装了dotnet-core RC1(我在部署过程之前卸载了它)
  • HttpPlatformHandler module was registered in IIS modules (which I removed but still doesn't work) HttpPlatformHandler模​​块在IIS模块中注册(我删除但仍然无效)
  • OS is Windows Server 2012 (whereas the other machines are 2008 and 2012 R2) 操作系统是Windows Server 2012(而其他机器是2008和2012 R2)

I did the following things but it always gave me 500 Error code and no errors in the log and no relevant events in windows event viewer. 我做了以下的事情,但它总是给我500错误代码,日志中没有错误,并且在Windows事件查看器中没有相关事件。

  • Created a app_offline.htm file but same result 创建了一个app_offline.htm文件但结果相同
  • iisreset (multiple times, wheneve I made a change in IIS) iisreset(多次,我在IIS中进行了更改)
  • Restarted the machine (2 times only) 重启机器(仅限2次)
  • Re-installed the asp net core module (manually and repair it) 重新安装asp net core模块(手动修复)
  • Granted Read,Write,Execute access to Default AppPool{{ApplicationName} in that folder 授予读取,写入,执行对该文件夹中的默认AppPool {{ApplicationName}的访问权限
  • Changed Application Pool Identity to Admin user 将应用程序池标识更改为管理员用户

I think the issue is somewhere between IIS and aspnet core module because this app does work in console. 我认为这个问题介于IIS和aspnet核心模块之间,因为这个应用程序可以在控制台中运行。 And I am also sure that web.config is correct because the same is working on other two machines btw in web.config it is instructed to run ".{{MyApplication}}.exe" 我也确定web.config是正确的,因为同样在web.config中的其他两台机器上工作,它被指示运行“。{{MyApplication}}。exe”

Any help will be highly appreciated as I've spent my whole day on it and really don't have any energy left to do this again tomorrow. 任何帮助都将受到高度赞赏,因为我已经花了一整天的时间,明天再也没有任何精力去做。

I fixed my own problem. 我解决了自己的问题。 Here is the solution if someone is having the same problem. 如果有人遇到同样的问题,这是解决方案。

The application pool for dotnet core app has no managed code selected BUT also make sure that Managed pipeline mode is set to Classic dotnet核心应用程序的应用程序池no managed code选择no managed code 但也确保 Managed pipeline mode设置为Classic

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 回发asp.net 4上的IIS 8.5 Windows Server 2012 R2错误“ HostingEnvironment导致关闭” - IIS 8.5 Windows Server 2012 R2 error “HostingEnvironment caused shutdown” on postback asp.net 4 在IIS 8.5和Windows Server 2012 R2上运行的ASP.NET应用程序的默认GC模式 - Default GC mode for ASP.NET applications running on IIS 8.5 and Windows Server 2012 R2 错误 500:在 Windows 服务器 2016 上将 .net Core 6 应用程序托管到 IIS - Error 500: Hosting .net Core 6 app into IIS on Windows Server 2016 当 C#/ASP.NET MVC 应用程序在线 (IIS 8.5) 在 Chrome 上时,只会收到 404 错误 - ONLY getting 404 error when C# / ASP.NET MVC app is online (IIS 8.5) when on Chrome 在 IIS 10 HTTP 上运行 ASP.NET 4.6 错误 500 - Running ASP.NET 4.6 on IIS 10 HTTP error 500 从 Docker 容器内的 ASP.Net Core 应用程序(Blazor)连接到 Azure SQL 服务器时出错 - Error when connecting to Azure SQL Server from an ASP.Net Core App (Blazor) inside a Docker container Windows Server 2012 + IIS + NET Framework版本错误 - Windows Server 2012 + IIS + NET Framework version error IIS中的ASP.NET Core + Framework获取HTTP 404 - ASP.NET Core + Framework in IIS getting HTTP 404 ASP.NET UDP套接字代码在开发中工作,但在IIS上不生产 - ASP.NET UDP socket code works in development, but not in production on IIS IIS 出现“HTTP 错误 500.30 - ASP.NET Core 应用程序无法启动” - “HTTP Error 500.30 - ASP.NET Core app failed to start” with IIS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM