gpt4 book ai didi

c# - IIS 服务器和 ASP.Net Core - 500.19,httpplatformhandler 标签上的错误代码为 0x8007000d

转载 作者:IT王子 更新时间:2023-10-29 04:09:04 31 4
gpt4 key购买 nike

当我尝试使用 IIS 服务器 v7.5 启动我的 ASP.Net Core 应用程序时出现以下错误...我已成功将网站(Visual Studio 中的文件系统选项)发布到特定目录。它从 approot/web.cmd 文件启动正常。但是,当我尝试将其连接到 IIS 服务器并将其指向 wwwroot 文件夹时,出现以下错误:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

  • Detailed Error Information
  • Module IIS Web Core
  • Notification Unknown
  • Handler Not yet determined
  • Error Code 0x8007000d
  • Config Error
  • Config File \?\D:\WebDevelopment\UAT\creativeNamePROD\wwwroot\web.config
  • Requested URL http://10.2.177.226:59/
  • Physical Path
  • Logon Method Not yet determined
  • Logon User Not yet determined
  • Failed Request Tracing Log Directory

下面是两个不同的 web.config 文件,我试过一个都没有用。当我尝试进入 IIS 中的配置编辑器时,我也遇到了一个不清楚的错误。任何帮助将不胜感激!!!

<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 - 得到同样的错误

<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>

最佳答案

我遇到了这个错误。我通过安装 .NET Core Windows Server Hosting bundle(相对于 Runtime Bundle)修复了这个错误,如 instructions like this one 中所述.

Install the .NET Core Hosting Bundle

Install the .NET Core Hosting Bundle on the hosting system. The bundle installs the .NET Core Runtime, .NET Core Library, and the ASP.NET Core Module. The module creates the reverse proxy between IIS and the Kestrel server. 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.

正如@Patrick 所说,您可以从 this link 下载安装包.

安装该模块后,我的应用程序开始运行(即没有 500 错误)。

我看到@Jørgen 已经在 OP 上发表了这个评论,所以他得到了信任。

编辑 请确认您根据@MDave 的评论安装托管包运行时包

Did you install the .NET Core Windows Server Hosting bundle? This is needed for IIS to work as a reverse proxy for the .net core libraries. You'll find the link in this article: learn.microsoft.com/en-us/aspnet/core/publishing/iis I had the same problem before installing this on my dev machine. – Jørgen Tvedt Mar 28 at 6:31

关于c# - IIS 服务器和 ASP.Net Core - 500.19,httpplatformhandler 标签上的错误代码为 0x8007000d,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37948865/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com