Möchtest du mehrere ASP.NET Core Applikationen betreiben und fragst dich, wie das mit den Hosting-Modellen InProcess und OutOfProcess funktioniert?
Hier erfährst du, worin der Unterschied liegt und wie du die richtige Einstellung vornimmst.
Die zwei Hosting-Modelle
Es gibt grundsätzlich zwei ASP.NET Core Hosting-Modelle:
InProcess
OutOfProcess
InProcess Hosting
Pro Webserver kann nur eine ASP.NET Core Applikation im InProcess-Modus betrieben werden.
Wenn du mehrere Anwendungen im InProcess-Modus ausführen möchtest, benötigst du für jede Applikation ein separates Webhosting – also einen eigenen Webserver.
OutOfProcess Hosting
Beim OutOfProcess-Modell besteht diese Einschränkung nicht.
Du kannst also mehrere ASP.NET Core Applikationen innerhalb eines Hostings gleichzeitig betreiben.
Anpassung in der web.config
Das gewünschte Hosting-Modell kannst du ganz einfach selbst in deiner web.config-Datei festlegen – zum Beispiel so:
<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>
