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的路径

 

 

 

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(1936)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2018-11-14 使用sql compare生成的sql语句
2018-11-14 string interpolation in sql server
2015-11-14 Hearthstone-Deck-Tracker汉化处理技巧
2014-11-14 Asynchronous Programming Using Delegates使用委托进行异步编程
2014-11-14 通过委托来实现异步 Delegate的BeginInvoke和EndInvoke
2014-11-14 DataSet 和 DataTable 以及 DataRow
点击右上角即可分享
微信分享提示