IIS shows 500.30 because the ASP.NET Core app dies while starting
Fix it fast
Most common cause, 1 of 2The 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.
<aspNetCore processPath="dotnet"
arguments=".\MyApp.dll"
stdoutLogEnabled="true"
stdoutLogFile=".\logs\stdout"
hostingModel="InProcess" />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.
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.
cd C:\inetpub\wwwroot\MyApp
dotnet .\MyApp.dllThen find the line you see in this list and open its fix:
- 1The app throws during startup on the server's configuration
Event 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 - 2The server lacks the ASP.NET Core shared framework the app targets
dotnet --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 startThe app failed to startThe app started but threw an exception during startuphit 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.
mkdir C:\inetpub\wwwroot\MyApp\logs
notepad C:\inetpub\wwwroot\MyApp\web.configFix
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.
<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.
dir C:\inetpub\wwwroot\MyApp\logsConfirmed by learn.microsoft.com
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.
dotnet --list-runtimesFix
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.
net stop was /y
net start w3svcVerify
dotnet --list-runtimes now lists Microsoft.AspNetCore.App with the target major version, and the site loads.
dotnet --list-runtimesConfirmed by learn.microsoft.com
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.