gpt4 book ai didi

c# - 使用 .NET Core 2.1 创建新项目后 IIS 上的事件错误 9009

转载 作者:行者123 更新时间:2023-12-02 04:28:17 24 4
gpt4 key购买 nike

我使用 .NET Core 2.0 应用程序几个月了。今天我开始创建 .NET Core 2.1 应用程序。在 Visual Studio 上一切正常。数据库、日志记录、服务、文件保存,一切。但是在 IIS 服务器上发布和部署它之后,我得到了这个错误:

HTTP Error 502.5 - Process Failure

打开事件查看器后我发现了这个树错误:

The Application Host Helper Service encountered an error trying to delete the history directory 'C:\inetpub\history\CFGHISTORY_0000000100'.  The directory will be skipped and ignored.  Note that the directory may still get deleted in the future if the service restarts.  The data field contains the error number.
The Application Host Helper Service encountered an error trying to delete the history directory 'C:\inetpub\history\CFGHISTORY_0000000101\schema'. The directory will be skipped and ignored. Note that the directory may still get deleted in the future if the service restarts. The data field contains the error number.
The Application Host Helper Service encountered an error trying to delete the history directory 'C:\inetpub\history\CFGHISTORY_0000000101'. The directory will be skipped and ignored. Note that the directory may still get deleted in the future if the service restarts. The data field contains the error number.

我正在寻找那些目录,但它们不存在。为了解决这个问题,我尝试了以下步骤:

  • 我重新启动了 IIS 服务器。
  • 我重新启动了应用程序主机助手服务。
  • 我安装了 Runtime & Hosting Bundle 2.1.2。

但是还是一样的问题。首先,我尝试在我的 PC 上的 IIS 服务器上解决此问题,因为我有虚拟主机,但也无法正常工作。我无法更改权限。在我的 PC ofc 中,是的,但不是在提供商的虚拟主机服务器上。

我已经安装了这些 nuget 包:

  • HtmlAgilityPack v1.8.5
  • Microsoft.AspNetCore.App v2.1.1
  • Microsoft.EntityFrameworkCore v.2.1.1
  • Microsoft.NetCore.App v2.1.0
  • Microsoft.VisualStudio.Web.CodeGeneration.Design v2.1.1
  • Serilog.AspNetCore v2.1.1
  • Serilog.Sinks.RollingFile v.3.1.0

感谢您的任何建议。

最佳答案

您需要安装 Hosting Bundle https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.1.2-windows-hosting-bundle-installer

然后在您的 IIS 上检查您是否拥有已注册的 Module AspNetCoreModule

关于c# - 使用 .NET Core 2.1 创建新项目后 IIS 上的事件错误 9009,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51524782/

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