当我访问我发布到本地IIS的应用程序时出现此错误:
HTTP错误500.19 - 内部服务器错误无法访问请求的页面,因为页面的相关配置数据无效。
我的web.config非常简单:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\TreesOnMars.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 14bfa9ba-0bd6-4ae2-a6f4-6e3e91d35263-->
可能有什么不对?我试图让所有用户都能阅读我的c:\inetpub\wwwroot
文件夹... web.config中没有任何明显的错误!我在this question尝试了一些解决方案,但它们没有用......
您需要安装.NET Core托管包以在IIS中托管.NET Core应用程序。该软件包安装.NET Core Runtime,.NET核心库和ASP.NET核心模块。 .NET Core 2.1托管包的链接在这里:https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.1.3-windows-hosting-bundle-installer
还要确保启用以下Windows功能:
更多信息可以在这里找到: