0
votes

I am using Visual Studio 2019 RC and ASP .NET Core 2.2. This by default is using the InProcess hosting model. Reading up on this a little bit, I found this official documentation:

For in-process, CreateDefaultBuilder calls UseIIS to:
[...]
Configure the port and base path the server should 
listen on when running behind the ASP.NET Core Module.

from https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-2.2#hosting-models

What makes me perplex on this is the last line clamining that IIS is running behind the ASP.NET Core Module. I can't quite imagine that this is true. When I call my ASP .NET page on http://localhost:<iisport>, obviously the first thing I hit is the IIS?

1
It's just a matter of formulation I guess, you might say that IIS is running in the background. In a way it is, it typically does not restart even when your app might.Peter B
When the original text says "IISHttpServer", it is "IIS HTTP Server" then, not "IIS". In general it is a module in IIS pipeline to host ASP.NET Core in process, not significantly different from other IIS modules.Lex Li

1 Answers

1
votes

Yes it hits IIS first, as long as you are hosting your asp.net core application in IIS.

The in process means your http request will be handled inside IIS request Pipeline just like classic asp.net, the only difference is that some of the IIS native module and all the IIS managed module won't be available in ASP.NET Core, refer to https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/modules?view=aspnetcore-2.2.

The out of process means your IIS will forward the request to asp.net core specific webserver called kestrel through a random port

Alternatively, if you really don't want your Application go through IIS pipeline, host your application in windows service is another choice. Refer to :https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/windows-service?view=aspnetcore-2.2