Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Node.js, PHP and APIs

IIS shows 500.30 because the ASP.NET Core app dies while starting

Your error

HTTP Error 500.30 - ASP.NET Core app failed to start4 more lines it can show

Fix it fast

Most common cause, 1 of 2

The app throws during startup on the server's configuration

Set stdoutLogEnabled to true with stdoutLogFile pointing at the logs folder, give the application pool's identity write access to that folder, and send one request.

Fix
<aspNetCore processPath="dotnet"
            arguments=".\MyApp.dll"
            stdoutLogEnabled="true"
            stdoutLogFile=".\logs\stdout"
            hostingModel="InProcess" />
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

HTTP Error 500.30 - ASP.NET Core app failed to start means the ASP.NET Core Module loaded your app inside IIS, but it threw or exited during startup. Run dotnet .\MyApp.dll in the site folder or enable the stdout log to see why. Typical causes: a missing production setting or secret, or an absent .NET 10 or 11 runtime.

  • Applies to .NET 11.0.0 and .NET 10.0.15 Hosting Bundle, ASP.NET Core Module V2, IIS on Windows Server
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Open an elevated prompt on the server, go to the folder IIS serves the site from, and start the app by hand. A stack trace from your own code points to cause 1; a complaint about a missing framework before any of your code runs points to cause 2.

Run this first
cd C:\inetpub\wwwroot\MyApp
dotnet .\MyApp.dll

Then find the line you see in this list and open its fix:

  1. 1The app throws during startup on the server's configurationEvent Viewer > Windows Logs > Application has an IIS AspNetCore Module entry saying the app hit an unexpected managed exception or exited from Program.Main, and the console run prints an exception from Program.cs or a service it registers
  2. 2The server lacks the ASP.NET Core shared framework the app targetsdotnet --list-runtimes shows no Microsoft.AspNetCore.App line with the major version in the project's TargetFramework, for example net11.0 on a server that only has 10.0.x

What does the error look like?

  • HTTP Error 500.30 - ASP.NET Core app failed to start
  • The app failed to start
  • The app started but threw an exception during startup
  • hit unexpected managed exception, exception code =
  • has exited from Program.Main with exit code =

Cause 1 of 2

The app throws during startup on the server's configuration

You seeEvent Viewer > Windows Logs > Application has an IIS AspNetCore Module entry saying the app hit an unexpected managed exception or exited from Program.Main, and the console run prints an exception from Program.cs or a service it registers

Check

500.30 is the module's In-Process Startup Failure: the app failed to start, started and then stopped, or threw during startup. On a server this is often configuration that only exists on a developer machine, such as a connection string, an environment-specific appsettings file, or secrets the app cannot read. Microsoft lists missing permissions on an Azure Key Vault as one common case. The stdout log records the exception text.

Check
mkdir C:\inetpub\wwwroot\MyApp\logs
notepad C:\inetpub\wwwroot\MyApp\web.config

Fix

Set stdoutLogEnabled to true with stdoutLogFile pointing at the logs folder, give the application pool's identity write access to that folder, and send one request. Fix the setting or permission the newest stdout file names, then turn stdout logging off again, because its files are never rotated or capped.

Fix
<aspNetCore processPath="dotnet"
            arguments=".\MyApp.dll"
            stdoutLogEnabled="true"
            stdoutLogFile=".\logs\stdout"
            hostingModel="InProcess" />

Verify

The site answers normally, no new IIS AspNetCore Module error appears in the Application log, and stdoutLogEnabled is back to false.

Verify
dir C:\inetpub\wwwroot\MyApp\logs

Confirmed by learn.microsoft.com

Did this fix it?

Cause 2 of 2

The server lacks the ASP.NET Core shared framework the app targets

You seedotnet --list-runtimes shows no Microsoft.AspNetCore.App line with the major version in the project's TargetFramework, for example net11.0 on a server that only has 10.0.x

Check

Framework-dependent apps run on the shared framework installed on the server. Microsoft names a target version that is not present as a common reason for this error. .NET 11.0.0 shipped on 10 November 2026, so a project moved to net11.0 fails on a server still carrying only the .NET 10 Hosting Bundle.

Check
dotnet --list-runtimes

Fix

Install the Hosting Bundle for the version the app targets, from an administrator shell, then restart IIS so worker processes pick up the new runtime. Publishing the app as self-contained is the other way out.

Fix
net stop was /y
net start w3svc

Verify

dotnet --list-runtimes now lists Microsoft.AspNetCore.App with the target major version, and the site loads.

Verify
dotnet --list-runtimes

Confirmed by learn.microsoft.com

Did this fix it?

How do I stop it coming back?

  • Upgrade the Hosting Bundle on every IIS server before any deploy that changes the project's TargetFramework.
  • Keep production-only settings in environment variables or a secrets store that the deploy checks for, and fail the pipeline when one is missing.
  • Leave stdoutLogEnabled false in the web.config you ship; switch it on only while you debug a start-up failure.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine on the same stack: Raheeb, Loade Driver, Dhero.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.