ASP.NET Core 2.2(发行版)产生错误并停止w3wp [英] ASP.NET Core 2.2 (release) produces an error and stops w3wp
问题描述
只需将我们的ASP.NET Core 2.1.5项目之一升级到今天发布的v 2.2。部署到生产服务器后,它将失败并关闭工作进程。
Just upgraded one of our ASP.NET Core 2.1.5 projects to v 2.2 released today. After deploying to a production server it fails and shuts down a worker process.
项目在Windows 10(1803 / 17134.441)上本地运行良好,但在生产服务器上运行不正常。具有所有最新Windows更新的Windows Server 2016(1607 / 14393.2639)。
Project runs fine locally on Windows 10 (1803 / 17134.441) but not on production server. Windows Server 2016 (1607 / 14393.2639) with all the latest Windows Updates.
我从 IIS AspNetCore Module V2
中收到以下错误:
找不到进程内请求处理程序。从
调用hostfxr捕获的输出:进程ID:5688。文件版本:12.2.18316.0。
说明:IIS ASP.NET核心模块V2。提交:
ce8cf65589734f82b0536c543aba5bd60d0a5a98
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
下一个错误显示:
错误的应用程序名称:w3wp.exe,版本:10.0.14393.0,时间
时间戳:0x57899b8a错误的模块名称:ucrtbase.dll,版本:
10.0.14393.2636,时间戳:0x5bda7e9c异常代码:0xc0000409错误偏移:0x000000000006e83e错误进程ID:0x1638错误
应用程序启动时间:0x01d48c39225c1989错误应用程序路径:
c:\windows\system32\inetsrv\w3wp.exe错误模块路径:
C:\Windows\System32\ucrtbase.dll报告ID:
685582aa-a590-4e03-b09a-5e3c36d7b758错误的程序包全名:
错误的程序包相对应用程序ID:
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。
I have re-installed the x64 Hosting Bundle as well as the SDK.
C:\Users\Administrator>dotnet --version
2.2.100
所有2.1-2.2迁移到o:
> https://docs.microsoft.com/zh-cn/aspnet/core/migration/21-to-22?view=aspnetcore-2.2&tabs=visual-studio
Did all 2.1-2.2 migrations too: https://docs.microsoft.com/en-us/aspnet/core/migration/21-to-22?view=aspnetcore-2.2&tabs=visual-studio
有什么问题吗?
推荐答案
对我来说,答案是咬人(从x86部署到x64)-pakrym的评论在这里解决了此事:
The answer for me was bitness (deployed x86 to x64) - comments by pakrym here solved the matter:
https://github.com/aspnet/AspNetCore/issues/4413#issuecomment-444624391
总结一下:
To summarise:
- 安装Windows主机捆绑包
- 确保独立应用程序发布的方式与运行IIS的方式相同(通常是x64)
- 确保未在应用程序池上设置启用32位应用程序选项。
- 从独立发布切换到可移植(取决于框架)发布之前,请清洁发布目录。
- 存在一个已知问题,即在运行In-Process时CurrentDirectory返回c:\windows\system32\inetsrv,请参考
https://github.com/aspnet/AspNetCore/issues/4206 有关
的更多详细信息。 - 考虑切换到便携式发布,它比独立发布具有很多优势。
- 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.
这篇关于ASP.NET Core 2.2(发行版)产生错误并停止w3wp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!