HTTP Error 500.31 - Failed to load ASP.NET Core runtime IIS issue

使用ASP.NET Core Diagnostics for IIS/IIS Express

Cannot locate runtime config file HttpApi.Host\HttpApi.Host.runtimeconfig.json

 

https://dotnet.microsoft.com/en-us/download/dotnet

https://dotnet.microsoft.com/en-us/download/dotnet/6.0

 

HTTP Error 500.31 - Failed to load ASP.NET Core runtime

 

评论:

The differences are not easy to observe if you are not familiar with IIS. Run reports docs.jexusmanager.com/tutorials/ancm-diagnostics.html and see what they say.
– Lex Li
Dec 16, 2020 at 6:28
 
 
回答1
Using the tool suggested (and created) by @LexLi I was able to determine the issue was caused by the application pool not having permissions to the site folder. Giving it permissions fixed the issue. This was not clear from the error messages. Answered here in case anyone else experiences the same error message.
 
评论:
  • You must run as admin to see your server. Then there is a "ASP.NET Core Diagnostics " link on the right when you highlight your site in the left tree. Though I think I got it to work, it got me no closer to figuring out my problem. Jan 25, 2021 at 22:34

ASP.NET Core Diagnostics for IIS/IIS Express — Jexus Manager 12.0 documentation

左侧栏,先选中IIS,然后右侧栏选择ViewSites,把站点加载进来。
然后左侧栏,选中target site。然后右侧选择ASP.NET Core Diagnostics
 
 
 
回答2

In my case, the target machine was missing the ASP.NET Core runtime itself.

Issue is resolved after installing the Hosting Bundle from .Net Core 3.1

 
 

 

其它配置问题

The two files, .\MyApp.dll and .\bin\Debug\.net6.0\MyApp.dll, are both executable files for an ASP.NET Core application. The main difference between the two files is that the .\MyApp.dll file is the compiled output of the application, while the .\bin\Debug\.net6.0\MyApp.dll file is a debug build of the application.

开发环境用带有bin目录的路径作为arguments,生产环境不需要带bin的路径

 

 

 

posted @ 2022-11-14 14:13  ChuckLu  阅读(2060)  评论(0)    收藏  举报