AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

Incorrect default stated.

Open JohnCOsborne opened this issue 5 years ago • 4 comments

It states here that Kestrel is used as the default.

ASP.NET Core project templates use Kestrel by default. In Program.cs, the ConfigureWebHostDefaults method calls UseKestrel:

On other docs, also for 3.1, it states that In-process is the default and that uses IISHttpServer

Since ASP.NET Core 3.0, in-process hosting has been enabled by default for all app deployed to IIS.

CreateDefaultBuilder adds an IServer instance by calling the UseIIS method to boot the CoreCLR and host the app inside of the IIS worker process (w3wp.exe or iisexpress.exe).

IIS HTTP Server (IISHttpServer) is used instead of Kestrel server. For in-process, CreateDefaultBuilder calls UseIIS to:

I may be mixed up but these seem like a direct conflict.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

JohnCOsborne avatar Dec 09 '20 18:12 JohnCOsborne

Rick Strahl's blog states that Kestrel is not the default web server when using In-process hosting. So if Strahl is correct then the docs stating that Kestrel is the default for 3.1 is incorrect, IF in-process is the default hosting method for a 3.1 app.

JohnCOsborne avatar Dec 09 '20 21:12 JohnCOsborne

@jkotalik please review

Rick-Anderson avatar Dec 09 '20 21:12 Rick-Anderson

I think the first doc comment can mention ASP.NET Core project templates use Kestrel by default when not hosted with IIS.

jkotalik avatar Dec 09 '20 21:12 jkotalik

Yeah, that threw me off. Makes sense now that I understand ASP.NET Core projects use kestrel when run outside of IIS

JohnCOsborne avatar Dec 09 '20 22:12 JohnCOsborne