在 IIS (0x8007000D) 中托管 .net core 3.0 时出错

Error while hosting .net core 3.0 in IIS (0x8007000D)

我创建了一个网站,它有以下 web.config 文件。在.net core 3.0 Self contained published version中是运行。 运行 前 Windows 7 现在我的公司更新到 windows 10 现在它停止工作了。它是相同的 IIS 配置,但无法读取 web.config 文件。我尝试了提到的其他解决方案,但我很乐意得到您的支持。提示 IIS 无法加载 webconfig 文件的错误。

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\ASU_Statistics.exe" arguments="" stdoutLogEnabled="false" hostingModel="InProcess" stdoutLogFile=".\logs\stdout">
        <environmentVariables>
          <environmentVariable name="ASPNETCODE_ENVIRONMENT" value="Production" />
          <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
          <environmentVariable name="ASPNETCORE_HTTPS_PORT" value="44370" />
          <environmentVariable name="COMPLUS_ForceENC" value="1" />
        </environmentVariables>
      </aspNetCore>
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: ee398fc0-8f34-4edf-9353-67342cbe9ee3-->

检查 AspNetCoreModuleV2 模块是否安装在服务器上。

如果未安装模块,请从此 link 下载 AspNetCoreModuleV2 并安装