无法检索日志记录设置 - IIS web.config .Net Core 1.1

Could not retrieve the logging settings - IIS web.config .Net Core 1.1

当我尝试浏览我的 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>

当我注释掉时:

<aspNetCore processPath="dotnet" arguments=".\MyWebsite.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />

我的 IIS 模块已加载,但我仍然遇到内部服务器错误。

最初,我认为这可能是我安装 .Net Core 1.1 Runtime 的方式出错,但是当我从命令行 运行 命令 dotnet MyWebsite.dll 时,我的网站 运行很好。

任何ideas/help赞赏,谢谢!

问题是我已经下载了 .Net Core Runtime Windows (x64) 安装程序,但应该已经下载了 .Net Core Runtime Windows 服务器托管(x64 和 x86)安装程序。 Windows 服务器托管包括 ASPNetCoreModule。

我通过查看网站下 IIS 中的处理程序映射(在注释掉导致 IIS 中错误的行之后)并看到我的 web.config 中引用的 aspNetCore 有一个 AspNetCoreModule 处理程序来确定问题.在查看该站点的 IIS 中的模块时,我注意到 AspNetCoreModule 丢失了。