How to debug in-process IIS in ASP.net Core MVC on VSCode

Viewed 794

Since Core 2.2 web applications can truly run in IIS (Express) without using Kestrel in the background. This is called IISHttpServer or the "in-process" hosting model. At the bottom of this question I will put down some articles about this. The last hyperlink in that list of references states that "ASP.NET Core apps default to the in-process hosting model" but that seems not to be the case in my environment.

I would like to debug with the in-process IISHttpServer, especially when it comes to Windows Authentication in Core (without Kernel or HTTP.sys). Unfortunally I can't seem to get this working in Visual Studio Code.

To reproduce, create a new project like this:

dotnet new mvc

In my .csproj file I add:

<PropertyGroup>
  <TargetFramework>netcoreapp3.0</TargetFramework>
  <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>

In the screenshot below you can see that this MVC app still uses Kestrel:

chrome screenshot with server header set to kestrel

How can I debug IIS in-process hosting with a Core project in VSCode?

When I try this with VS2019, it works fine. The answer might be in the content of launch.json and launchSettings.json as dotnet generates them.

References:

0 Answers
Related