ASP.NET Core 2.2 (release) 产生错误并停止 w3wp [英] ASP.NET Core 2.2 (release) produces an error and stops w3wp

查看:44
本文介绍了ASP.NET Core 2.2 (release) 产生错误并停止 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 Server 2016 (1607/14393.2639) 包含所有最新的 Windows 更新.

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 得到以下错误:

I get the following error from IIS AspNetCore Module V2:

找不到进程内请求处理程序.捕获的输出来自调用 hostfxr:进程 ID:5688.文件版本:12.2.18316.0.描述:IIS ASP.NET Core 模块 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:windowssystem32inetsrvw3wp.exe 错误模块路径:C:WindowsSystem32ucrtbase.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:windowssystem32inetsrvw3wp.exe Faulting module path: C:WindowsSystem32ucrtbase.dll Report Id: 685582aa-a590-4e03-b09a-5e3c36d7b758 Faulting package full name: Faulting package-relative application ID:

我重新安装了 x64 Hosting Bundle 和 SDK.

I have re-installed the x64 Hosting Bundle as well as the SDK.

C:UsersAdministrator>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

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

可能有什么问题?

推荐答案

我的答案是 bitness (deployed x86 to 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

总结:

  1. 安装 Windows Hosting Bundle
  2. 确保发布的独立应用程序与它们在其中运行的 IIS 具有相同的位数(通常是 x64)
  3. 确保未在应用程序池中设置启用 32 位应用程序选项.
  4. 在从独立发布切换到可移植(依赖于框架)发布之前清理发布目录.
  5. 存在一个已知问题,即 CurrentDirectory 在运行 In-Process 时返回 c:windowssystem32inetsrv 请参阅https://github.com/aspnet/AspNetCore/issues/4206 了解更多详情在那.
  6. 考虑切换到便携式发布,它比独立发布有很多优势.

这篇关于ASP.NET Core 2.2 (release) 产生错误并停止 w3wp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆