【发布时间】:2019-10-15 09:32:31
【问题描述】:
我在 localhost::80 将我的 asp.net(net core app 2.1)发布到 windows 2012 r2。 它给了我以下错误:
HTTP 错误 500.19 - 内部服务器错误 请求的页面无法访问,因为该页面的相关配置数据无效。
详细错误信息:
模块 IIS Web 核心
通知未知
处理程序尚未确定
错误代码 0x8007000d
配置错误
配置文件\web.config
请求的网址:80/
物理路径
登录方式尚未确定
登录用户尚未确定
据我检查,错误似乎在 web.config 中 我将 web.config 放在代码部分。
我已尝试删除 web.config 并启用目录浏览,使 index.html 加载 index.cshtml 但这不起作用,因为 MVC。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<modules>
<!-- Remove WebDAV module so that we can make DELETE requests -->
<remove name="WebDAVModule" />
</modules>
<handlers>
<!-- Remove WebDAV module so that we can make DELETE requests -->
<remove name="WebDAV" />
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<!-- When deploying on Azure, make sure that "dotnet" is installed and the path to it is registered in the PATH environment variable or specify the full path to it -->
<aspNetCore requestTimeout="23:00:00" processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" startupTimeLimit="3600">
<environmentVariables />
</aspNetCore>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
我预计它会启动,但碰巧我得到了错误。 感谢您的帮助。
【问题讨论】:
-
当您远程访问服务器时,您是否可以打开 IIS 管理器,在“站点”下找到您的网站并成功从 IIS 浏览网站?
-
以上所有但无法浏览。 500.19 错误。
-
docs.jexusmanager.com/tutorials/ancm-diagnostics.html 您可以运行报告了解原因,但很可能您忘记安装 ASP.NET Core 模块,就像 SO 上的许多其他线程一样。
-
@LexLi 感谢您的回答!碰巧,我在本地机器上安装了 aspnetcore 模块,它仍然抛出错误。
-
您现在应该看到 502.5 错误,因为您为 processPath 和参数提供了错误的值。
标签: c# asp.net iis iis-7.5 windows-server-2012-r2