asp.net core部署到IIS8.5报500错误
kelvin 发布于 2021-03-14

在云服务器上部署asp.net core的程序,然后运行发现报了500.19,服务器上可以看到下面比较详细的错误提示,

This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

看提示以为是配置配错了,但是本机是可以运行的,后面觉得可能是服务器上少安装了,我只安装了aspnetcore-runtime-3.1.10-win-x64.exe,因为之前另一台服务器没问题,本机也没问题,只是过了段时间忘了少安装了什么,到官网上https://dotnet.microsoft.com/download/dotnet/3.1

下载了dotnet-hosting-3.1.10-win.exe,如下图显示的点击Hosting Bundle即可下载,安装之后再运行就没有错误了。

kelvin
关注 私信
文章
92
关注
0
粉丝
0