ASP.NET Core 2.2(发行版)产生错误并停止 w3wp
ASP.NET Core 2.2 (release) produces an error and stops w3wp
刚刚将我们的一个 ASP.NET 核心 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 主机捆绑包和 SDK。
C:\Users\Administrator>dotnet --version
2.2.100
也进行了所有 2.1-2.2 迁移:
https://docs.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:
- Install Windows Hosting Bundle
- Make sure standalone apps are published with the same bitness as IIS they are running in (usually x64)
- Make sure Enable 32-Bit Applications option is not set on the app pool.
- Clean publish directory before switching from standalone to portable (framework-dependent) publish.
- 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.
- Consider switching to portable publish, it has a lot of advantages over standalone.
这个问题 return 与您安装的环境不同 asp .net 核心 运行 用于构建您的应用程序的 .net 时间 请注意,您必须具有相同的版本和如果您在 2.2.0 和 2.2.1 等安全补丁上有不同,您将再次面临同样的问题。
刚刚将我们的一个 ASP.NET 核心 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 主机捆绑包和 SDK。
C:\Users\Administrator>dotnet --version
2.2.100
也进行了所有 2.1-2.2 迁移: https://docs.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:
- Install Windows Hosting Bundle
- Make sure standalone apps are published with the same bitness as IIS they are running in (usually x64)
- Make sure Enable 32-Bit Applications option is not set on the app pool.
- Clean publish directory before switching from standalone to portable (framework-dependent) publish.
- 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.
- Consider switching to portable publish, it has a lot of advantages over standalone.
这个问题 return 与您安装的环境不同 asp .net 核心 运行 用于构建您的应用程序的 .net 时间 请注意,您必须具有相同的版本和如果您在 2.2.0 和 2.2.1 等安全补丁上有不同,您将再次面临同样的问题。