Skip to content

Instantly share code, notes, and snippets.

@ststeiger
Last active March 1, 2025 19:00
Show Gist options
  • Save ststeiger/6b85e7b45e1bce3a55561093b70a95e4 to your computer and use it in GitHub Desktop.
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-<VER>-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

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