Would you like to run multiple ASP.NET Core applications and wonder how the InProcess and OutOfProcess hosting models work?
Here’s what you need to know and how to configure them correctly.
The Two Hosting Models
There are two ASP.NET Core hosting models:
InProcess
OutOfProcess
InProcess Hosting
A web server can only run one ASP.NET Core application in InProcess mode.
If you want to run multiple applications in InProcess mode, you’ll need a separate web hosting (web server) for each application.
OutOfProcess Hosting
With the OutOfProcess model, this limitation doesn’t apply.
You can run multiple ASP.NET Core applications within the same hosting account simultaneously.
Adjusting the web.config
You can easily define the desired hosting model in your web.config file, for example:
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<aspNetCore processPath="dotnet" arguments=".\admin.api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="outofprocess" />
</system.webServer>
</location>
</configuration>
