IIS hosted Aps.Net API fails after upgrading from ASP.Net Core 3.0 to .net Core 3.1

1

I have a simple API that I bumped from .Net Core 3.0 to .net Core 3.1 hosted InProcess in IIS. All packages are updated to latest version and the application works on my development machine both in release and debug.

There are no configuration or server changes done beside installing the new hosting bundle.

On the server I have installed “ASP.NET Core 3.1 Runtime (v3.1.1) - Windows Hosting Bundle” and the server is VM with fully patched server 2016 standard.

My API can serve static files (Swagger) successfully but any API request comes in returns 401 (Windows authentication) and then crashes the app pool without any logging. Nothing about the crash in my logging and the STDOUT logging for .net core is totally empty.

The only thing I get is in event viewer:

Faulting application name: w3wp.exe, version: 10.0.14393.0, time

stamp: 0x57899b8a Faulting module name: coreclr.dll, version:

4.700.19.60701, time stamp: 0x5debd517 Exception code: 0xc00000fd Fault offset: 0x00000000000d332d Faulting process id: 0x1bd8 Faulting

application start time: 0x01d5d20038929f92 Faulting application path:

c:\windows\system32\inetsrv\w3wp.exe Faulting module path: C:\Program

Files\dotnet\shared\Microsoft.NETCore.App\3.1.1\coreclr.dll Report Id:

05869df6-8b2c-4b8a-b44a-eefe315d1559 Faulting package full name:

Faulting package-relative application ID:

And in my testing, there are different dll’s that crash (faulting module) for different releases/debug that I have done. From unknown to System.Collections.Concurrent.dll and coreclr.dll

I have checked that the .net core runtime is installed:

dotNet –info in cmd line returns

NET Core SDKs installed: No SDKs were found.

.NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.0

[C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 3.1.1 [C:\Program

Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App > 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

My web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" 
        arguments=".***********.dll" 
        stdoutLogEnabled="true" 
        stdoutLogFile=".\logs\stdout" 
        hostingModel="inprocess" >
          <environmentVariables>
    <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
    <environmentVariable name="WEBCONNECTION_DETAILEDERRORS" value="1" />

    <environmentVariable name="WEBCONNECTION_USELIVERELOAD" value="False" />
    <environmentVariable name="WEBCONNECTION_OPENBROWSER" value="False" />
    <environmentVariable name="WEBCONNECTION_SHOWURLS" value="False" />
  </environmentVariables>
</aspNetCore>   
    </system.webServer>
  </location>
</configuration>

I have also checked that I don’t have any references to any .net core 2.0 dlls as per Rick Strahl blog

c#
asp.net-core
iis
asked on Stack Overflow Jan 24, 2020 by Archlight

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0