liveBook · Manning

Out-of-process hosting model

As explained in ASP.NET Core in Action, 3e

An out-of-process hosting model runs an ASP.NET Core application in a separate process from IIS, which forwards requests to it.

An out-of-process hosting model runs an ASP.NET Core application separately from IIS. IIS acts as a reverse proxy, forwarding incoming requests to the application process. section 27.2.2 section 27.5

Configure and deploy the model with these practical rules:

  • Use UseIISIntegration() with a custom application builder. WebApplicationBuilder adds IIS integration automatically. section 27.2.2
  • Install the ASP.NET Core Module, .NET Runtime, and ASP.NET Core Runtime so IIS can host the published application. section 27.5
  • Deploy the generated web.config with the published output; it defines how IIS should run the application. section 27.5
  • Choose this mode when separate-process behavior helps troubleshoot hosting problems; in-process hosting generally avoids interprocess communication and can improve performance. section 27.2.2 section 27.5

Published application behind IIS

Publish the application with dotnet publish --output publish_folder --configuration Release, deploy the output including web.config, and let IIS forward requests to the separate ASP.NET Core process. A published application can run with dotnet app.dll; its listening URL can be controlled with ASPNETCORE_URLS or --urls. section 27.2.2 section 27.5

dotnet publish --output publish_folder --configuration Release

Use the publishing command to create the deployable application output. section 27.2.2

How ASP.NET Core in Action, 3e covers it

How deep it goes
Defines process separation, request forwarding, integration methods, defaults, troubleshooting use, and deployment requirements without detailed hosting configuration.
Examples
Uses a published application, dotnet app.dll, IIS at localhost:81, and a custom builder requiring IIS integration.
What it assumes
Requires IIS, the ASP.NET Core Module, the .NET Runtime, and the ASP.NET Core Runtime for IIS deployment.
What you can do after
Operate/configure IIS hosting by selecting out-of-process integration, publishing the application, and deploying the generated web.config.
How it connects
Connects IIS, reverse proxy, ASP.NET Core Module, WebApplicationBuilder, UseIISIntegration(), and in-process hosting.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.