[英]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: 机器不工作的不同之处是:
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事件查看器中没有相关事件。
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.