After the release of .net core 2.1, hostingModel="inprocess" does not appear in web.config, no problem。

After the release of .net core 3.1, delete hostingModel="inprocess" and you can browse normally。

Ask what causes it, I want to solve this problem

 <aspNetCore processPath="dotnet" arguments=".\NewDeBao.OfficeApplication.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
2

There are 2 best solutions below

0
On

As far as I know, before asp.net core 2.2, ASP.NET Core apps run in a process separate from the IIS worker process, the module also handles process management. The asp.net core apps are running at the Kestrel.

But starting with 2.2, the asp.net core module uses an in-process server implementation for IIS. The in-process hosting model isn't supported for ASP.NET Core apps that target the .NET Framework. I guess this may caused your issue.

To solve this issue, you could try to host asp.net core as OutOfProcess as asp.net core 2.1.

More details, you could refer to below web.config setting:

 <aspNetCore processPath="dotnet" arguments=".\NewDeBao.OfficeApplication.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="OutOfProcess" />
1
On

If you want to keep the old behavior of 2.1, update your csproj file to set the hosting model as OutOfProcess:

<PropertyGroup>
  <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>

InProcess is the new default for apps deployed to IIS, and comes with some performance benefits. OutOfProcess apps are served by Kestrel, and IIS or whatever is sitting in front will reverse proxy requests to Kestrel. InProcess on the other hand doesn't use Kestrel. IIS instead runs your app "in process".

From the docs:

In-process hosting provides improved performance over out-of-process hosting because requests aren't proxied over the loopback adapter, a network interface that returns outgoing network traffic back to the same machine.

Depending on your setup you might or might not want to use in-process with IIS. But choosing Out of Process because of "failure to browse normally" doesn't seem like a good idea to me :)