gpt4 book ai didi

iis - ASP.NET Core 2.2(发布版)产生错误并停止 w3wp

转载 作者:行者123 更新时间:2023-12-01 13:17:16 26 4
gpt4 key购买 nike

刚刚将我们的一个 ASP.NET Core 2.1.5 项目升级到今天发布的 v 2.2。部署到生产服务器后,它会失败并关闭工作进程。

项目在 Windows 10 (1803/17134.441) 上本地运行良好,但在生产服务器上运行不佳。 Windows Server 2016 (1607/14393.2639) 以及所有最新的 Windows 更新。

我从 IIS AspNetCore Module V2 得到以下错误:

Could not find inprocess request handler. Captured output from invoking hostfxr: Process Id: 5688. File Version: 12.2.18316.0. Description: IIS ASP.NET Core Module V2. Commit: ce8cf65589734f82b0536c543aba5bd60d0a5a98

下一个错误显示:

Faulting application name: w3wp.exe, version: 10.0.14393.0, time stamp: 0x57899b8a Faulting module name: ucrtbase.dll, version: 10.0.14393.2636, time stamp: 0x5bda7e9c Exception code: 0xc0000409 Fault offset: 0x000000000006e83e Faulting process id: 0x1638 Faulting application start time: 0x01d48c39225c1989 Faulting application path: c:\windows\system32\inetsrv\w3wp.exe Faulting module path: C:\Windows\System32\ucrtbase.dll Report Id: 685582aa-a590-4e03-b09a-5e3c36d7b758 Faulting package full name: Faulting package-relative application ID:

我已经重新安装了 x64 主机 bundle 和 SDK。

C:\Users\Administrator>dotnet --version
2.2.100

是否也进行了所有 2.1-2.2 迁移: https://learn.microsoft.com/en-us/aspnet/core/migration/21-to-22?view=aspnetcore-2.2&tabs=visual-studio

有什么问题吗?

最佳答案

我的答案是位数(将 x86 部署到 x64)- pakrym 在这里的评论解决了这个问题:

https://github.com/aspnet/AspNetCore/issues/4413#issuecomment-444624391

To summarise:

  1. Install Windows Hosting Bundle
  2. Make sure standalone apps are published with the same bitness as IIS they are running in (usually x64)
  3. Make sure Enable 32-Bit Applications option is not set on the app pool.
  4. Clean publish directory before switching from standalone to portable (framework-dependent) publish.
  5. There is a known issue where CurrentDirectory returns c:\windows\system32\inetsrv when running In-Process please refer to https://github.com/aspnet/AspNetCore/issues/4206 for more details on that.
  6. Consider switching to portable publish, it has a lot of advantages over standalone.

关于iis - ASP.NET Core 2.2(发布版)产生错误并停止 w3wp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53623972/

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