Tri*_*ire 1 .net iis web-config .net-core
当我尝试浏览到我的 IIS 站点时,当前出现内部服务器错误,但没有有用的错误消息。我注意到的一件事是,当我访问 IIS 模块时,出现上述错误或类似错误。我的 web.config 非常基本,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\MyWebsite.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
当我注释掉时:
<aspNetCore processPath="dotnet" arguments=".\MyWebsite.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
Run Code Online (Sandbox Code Playgroud)
我的 IIS 模块已加载,但我仍然收到内部服务器错误。
最初,我认为这可能是我如何安装 .Net Core 1.1 运行时的错误,但是当我从命令行运行命令 dotnet MyWebsite.dll 时,我的网站运行良好。
任何想法/帮助表示赞赏,谢谢!
问题是我已经下载了 .Net Core Runtime Windows (x64) 安装程序,但应该已经下载了 .Net Core Runtime Windows Server Hosting(x64 和 x86)安装程序。Windows Server Hosting 包括 ASPNetCoreModule。
我通过查看站点下 IIS 中的处理程序映射(在注释掉导致 IIS 中的错误的行之后)确定了问题,并看到我的 web.config 中引用的 aspNetCore 有一个 AspNetCoreModule 处理程序。在查看该站点的 IIS 中的模块时,我注意到缺少 AspNetCoreModule。
| 归档时间: |
|
| 查看次数: |
4226 次 |
| 最近记录: |