[英]IIS Server & ASP.Net Core - 500.19 with error code 0x8007000d on httpplatformhandler tag
I am getting the following error when I try to launch my ASP.Net Core App using IIS Server v7.5 ... I published the website (File System option in Visual Studio) to a specific directory successfully.当我尝试使用 IIS Server v7.5 启动我的 ASP.Net Core 应用程序时出现以下错误...我成功地将网站(Visual Studio 中的文件系统选项)发布到特定目录。 It launches fine from approot/web.cmd file.
它从 approot/web.cmd 文件启动正常。 But when I try to hook it up to IIS Server and point it to the wwwroot folder, I get the following error:
但是当我尝试将它连接到 IIS 服务器并将其指向 wwwroot 文件夹时,我收到以下错误:
HTTP Error 500.19 - Internal Server Error
HTTP 错误 500.19 - 内部服务器错误
The requested page cannot be accessed because the related configuration data for the page is invalid.
无法访问请求的页面,因为该页面的相关配置数据无效。
- Detailed Error Information
详细的错误信息
- Module IIS Web Core
模块 IIS Web 核心
- Notification Unknown
通知未知
- Handler Not yet determined
处理程序尚未确定
- Error Code 0x8007000d
错误代码 0x8007000d
- Config Error
配置错误
- Config File \\?\\D:\\WebDevelopment\\UAT\\creativeNamePROD\\wwwroot\\web.config
配置文件 \\?\\D:\\WebDevelopment\\UAT\\creativeNamePROD\\wwwroot\\web.config
- Requested URL http://10.2.177.226:59/
请求的 URL http://10.2.177.226:59/
- Physical Path
物理路径
- Logon Method Not yet determined
登录方式尚未确定
- Logon User Not yet determined
登录用户尚未确定
- Failed Request Tracing Log Directory
失败的请求跟踪日志目录
Below are two different web.config files I tried any neither one worked.下面是两个不同的 web.config 文件,我尝试过任何一个都不起作用。 When I try to get into Configuration Editor within IIS, I get an unclear error as well.
当我尝试进入 IIS 中的配置编辑器时,我也收到了一个不清楚的错误。 Any help would be greatly appreciated!!!
任何帮助将不胜感激!!!
<configuration>
<system.web>
<httpRuntime maxQueryStringLength="64768" maxUrlLength="65536" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="64768" />
</requestFiltering>
</security>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout.log" startupTimeLimit="3600"></httpPlatform>
</system.webServer>
</configuration>
Web.config #2 -gets the same error Web.config #2 - 得到同样的错误
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout.log" startupTimeLimit="3600"></httpPlatform>
</system.webServer>
</configuration>
I was getting this error.我收到这个错误。 I fixed this error by installing the .NET Core Windows Server Hosting bundle (vs the Runtime Bundle ), as described in instructions like this one .
我通过安装 .NET Core Windows Server Hosting bundle (与Runtime Bundle 相比)修复了这个错误, 如 this one 的说明中所述。
Install the .NET Core Hosting Bundle
安装 .NET Core 托管捆绑包
Install the .NET Core Hosting Bundle on the hosting system.
在托管系统上安装.NET Core Hosting Bundle 。 The bundle installs the .NET Core Runtime, .NET Core Library, and the ASP.NET Core Module.
该包安装 .NET Core 运行时、.NET Core 库和 ASP.NET Core 模块。 The module creates the reverse proxy between IIS and the Kestrel server.
该模块在 IIS 和 Kestrel 服务器之间创建反向代理。 If the system doesn't have an Internet connection, obtain and install the Microsoft Visual C++ 2015 Redistributable before installing the .NET Core Hosting Bundle.
如果系统没有 Internet 连接,请在安装 .NET Core Hosting Bundle 之前获取并安装 Microsoft Visual C++ 2015 Redistributable。
As @Patrick says you can download the bundle installables from this link .正如@Patrick 所说,您可以从此链接下载安装包。
After installing that Module, my app served (ie no 500 error).安装该模块后,我的应用程序提供服务(即没有 500 错误)。
I see @Jørgen made this comment on OP already, so he gets credit.我看到@Jørgen 已经在 OP 上发表了这个评论,所以他得到了信任。
EDIT Please confirm you install the Hosting bundle vs the Runtime Bundle per comment by @MDave编辑请确认您安装了托管捆绑包与运行时捆绑包@MDave 的每条评论
Did you install the .NET Core Windows Server Hosting bundle?
您是否安装了 .NET Core Windows Server Hosting 包? This is needed for IIS to work as a reverse proxy for the .net core libraries.
这是 IIS 用作 .net 核心库的反向代理所必需的。 You'll find the link in this article: docs.microsoft.com/en-us/aspnet/core/publishing/iis I had the same problem before installing this on my dev machine.
您将在本文中找到链接:docs.microsoft.com/en-us/aspnet/core/publishing/iis 在我的开发机器上安装它之前我遇到了同样的问题。 – Jørgen Tvedt Mar 28 at 6:31
– Jørgen Tvedt 3 月 28 日 6:31
The only solution worked for me was to install 2 more items from Microsoft dot net core library:唯一对我有用的解决方案是从 Microsoft dot net core 库中安装另外 2 个项目:
https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.0.6-windows-x64-asp.net-core-runtime-installer
https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.0.6-windows-x64-asp.net-core-runtime-installer
and和
https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.0.6-windows-server-hosting-installer
https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.0.6-windows-server-hosting-installer
这对我dotnet restore
,删除文件: project.lock.json
并运行dotnet restore
, restart visual studio
。
I was able to solve this same problem when running in Visual Studio Community 2017 v. 15.7.1.在 Visual Studio Community 2017 v. 15.7.1 中运行时,我能够解决同样的问题。
Had to install the latest dotnet-sdk-2.1.300-rc1-008673-win-x64.必须安装最新的 dotnet-sdk-2.1.300-rc1-008673-win-x64。
https://www.microsoft.com/net/download/dotnet-sdk-2.1.300-rc1-windows-x64-installer https://www.microsoft.com/net/download/dotnet-sdk-2.1.300-rc1-windows-x64-installer
I had this problem with one .NET 6.0 site, but not another, so I knew the hosting pack was installed and functioning correctly.我在一个 .NET 6.0 站点上遇到了这个问题,但在另一个站点上没有,所以我知道托管包已安装并且运行正常。
The issue turned out to be that the broken site had some elements pertaining the URL Rewrite module, but the module wasn't installed.问题原来是损坏的站点有一些与 URL 重写模块有关的元素,但该模块没有安装。
Problem solved by either removing those elements, or installing the URL Rewrite module.通过删除这些元素或安装 URL Rewrite 模块解决了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.