Enabling the InProcess Hosting Model

As of ASP.NET Core version 2.2 + there is a new hosting model that adds support for direct In Process hosting which improves throughput considerably.

The original versions of ASP.NET Core required you to host on IIS using an Out of Process model that proxies through IIS. Requests hit IIS and are forwarded to your ASP.NET Core app running on the Kestrel web server.

With ASP.NET Core 2.2 there's now an In Process hosting model on IIS which hosts ASP.NET Core directly inside of an IIS Application pool without having to proxy to an external dotnet.exe instance on Kestrel.

To enable the In Process method you can simply change to that in the Visual Studio UI or by editing your web project's .csproj file as follows:

<PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>

This affects your configuration files when you publish your project and what it generates into the web.config file when the project is published like as follows:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" />
      </handlers>
      
      <!-- hostingModel is the new property here -->
      <aspNetCore processPath="dotnet" arguments=".\WebApplication1.dll"	
			      stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"
			      hostingModel="InProcess" />
			      
    </system.webServer>
  </location>
</configuration>

We recommend all clients using Core 2.2 + use the InProcess hosting model as it increases performance and has a tighter integration with our IIS servers.

 

 

 

  • InProcess, model, core, asp.net core
  • 31 Users Found This Useful
Was this answer helpful?

Related Articles

HTTP Error 500.21 - Internal Server Error Handler "aspNetCore" has a bad module "AspNetCoreModuleV2" in its module list

If you receive the following error in your ASP.NET Core application please see the fix below:...

Enable .Net & .Net Core Debug Logging

By default error logging is turned off in .Net Core, .Net which is excellent for security....

HTTP Error 500.32 - Failed to load .NET Core host

If you receive the error "HTTP Error 500.32 - Failed to load .NET Core host" response from your...

How to enable ASP.NET, .Net Core & .Net on your website

.Net Core (All Versions) & .Net 6.0 & 7.0, ASP.NET 4.x and 2.x and Classic ASP are...