Skip to content

Instantly share code, notes, and snippets.

@ststeiger
Last active November 13, 2025 15:42
Show Gist options
  • Select an option

  • Save ststeiger/6b85e7b45e1bce3a55561093b70a95e4 to your computer and use it in GitHub Desktop.

Select an option

Save ststeiger/6b85e7b45e1bce3a55561093b70a95e4 to your computer and use it in GitHub Desktop.
Tutorial - install asp.net core application in IIS

Step 1: Install IIS .NET-Core Hosting-Bundle

Use this permalink
from
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/hosting-bundle?view=aspnetcore-9.0#install-the-net-core-hosting-bundle

The bundle file is called something along the lines of dotnet-hosting-<VERSION>-win.exe

Step 2.

Create new Application Pool with "No Managed Code"

NoDotnetRuntimeInAppPool

Step 3.

Publish the application with the following options:
Release, Net9, Self-Contained, win-x64 and NOT a single file
Publish Options

Step 4

Mark the folder as application in inetmgr.exe
Set its application pool to the newly created application-pool
(.net core apps must have 1 application pool per application)

Step 5

Check the site in inetmgr.exe and add https bindings if necessary IIS Bindings

Step 6

Test if it works


German:

Schritt 1:

Das .NET-Core Hosting-Paket für IIS installieren
diesen Permalink
von
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/hosting-bundle?view=aspnetcore-9.0#install-the-net-core-hosting-bundle
verwenden
Die Bundle-Datei hat einen Namen wie dotnet-hosting-<VERSION>-win.exe

Schritt 2.

Im IIS einen neuen Anwendungspool «No Managed Code / ohne verwalteten Code» erstellen

NoDotnetRuntimeInAppPool

Schritt 3.

Die Anwendung mit den folgenden Optionen veröffentlichen:
Release, Net9, eigenständig, Win-x64 und NICHT als einzelne Datei
Veröffentlichungsoptionen

Schritt 4

Den Ordner in inetmgr.exe als Anwendung markieren.
Die Anwendung dem neu erstellten Anwendungspool zuweisen.
(.NET Core-Anwendungen benötigen einen Anwendungspool pro Anwendung.)

Schritt 5

In inetmgr.exe die Anwendung überprüfen und gegebenenfalls die HTTPS-Bindung hinzufügen.
IIS-Bindungen

Schritt 6

Testen, ob es funktioniert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment