Install the .NET Hosting Bundle and run ASP.NET Core on IIS
Install the right .NET Hosting Bundle after IIS, restart IIS, publish your ASP.NET Core app and fix the common 500.x errors.
- Intermediate
- Windows VPS
- 2 min read
ASP.NET Core apps run behind IIS through the ASP.NET Core Module, which ships in Microsoft's .NET Hosting Bundle. The bundle also installs the .NET and ASP.NET Core runtimes, so it is the one download you need on a web server.
1. Install IIS first
The hosting bundle registers itself with IIS, so IIS must already be installed. If it is not, follow Install IIS and host a website and come back.
If you install the bundle before IIS, run the bundle installer again afterwards and choose Repair.
2. Find the version your app needs
Check your project file for the target framework, for example <TargetFramework>net8.0</TargetFramework>. Install the hosting bundle for that major version. Several versions can be installed side by side.
3. Download and install the bundle
- On the server, open dotnet.microsoft.com, go to Download .NET, and choose your version.
- Under ASP.NET Core Runtime, download Hosting Bundle for Windows.
- Run the installer as Administrator.
- Restart IIS so it loads the new module:
net stop was /y
net start w3svc4. Confirm what is installed
dotnet --list-runtimesYou should see Microsoft.AspNetCore.App and Microsoft.NETCore.App for your version.
5. Publish and host the app
- On your development PC, publish the app:
dotnet publish -c Release -o ./publish. - Copy the
publishfolder to the server, for example toC:\inetpub\myapp(ways to copy files). - In IIS Manager, open Application Pools, select your site's pool and set .NET CLR version to No Managed Code. ASP.NET Core runs in its own process, not the classic CLR.
- Point the site's physical path at
C:\inetpub\myappand browse to it.
Troubleshooting
- HTTP Error 500.19 (0x8007000d): the ASP.NET Core Module is missing. Install or repair the hosting bundle, then restart IIS.
- HTTP Error 500.30 / 500.31: the app failed to start or the right runtime is missing. Run the app's
.exefrom the publish folder in a terminal to see the real error, and compare withdotnet --list-runtimes. - Need to see logs: set
stdoutLogEnabled="true"in the app'sweb.configtemporarily and create thelogsfolder it points to.
Next steps
Was this guide helpful?
Still stuck?
Ask RunRacks AI for a quick answer, or open a ticket and our team will take a look at your server.
Related guides
Windows VPS & RDP
RunRacks RDP port 12230: how to connect to your Windows VPS and Admin RDP
RunRacks Windows VPS and Admin RDP servers accept Remote Desktop on port 12230, not 3389. Here is how to connect from every device and keep the port open.
- Beginner
- Windows VPS · Admin RDP
- 5 min read
Windows VPS & RDP
Allow or block multiple RDP sessions for one user
Understand why a new Remote Desktop login takes over your old session, how the single-session policy works on Windows Server, and which setting suits a team.
- Advanced
- Windows VPS
- 5 min read
Windows VPS & RDP
Create Windows users with Remote Desktop access
Give each person their own Windows login, add them to Remote Desktop Users, test the account and remove access cleanly later.
- Beginner
- Windows VPS · Admin RDP
- 2 min read