3
votes

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.

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.

I get the following error from 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

Next error shows:

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:

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

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

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

What could be wrong?

2
have you restarted?Daniel A. White
Yeah, I restarted IIS, then server in second round - neither worked unfortunately.Sha
i'd reach out on github.Daniel A. White
Will do that - if anybody interested follow here: github.com/aspnet/AspNetCore/issues/4413Sha

2 Answers

4
votes

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:

  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.
0
votes

This issue return to difference between your environment installed asp .net core run time with .net that used for build your app please noted that you must have same version and if you have even different on security patch like 2.2.0 and 2.2.1 you again faced with same issue .