sfw/fix
500.30 critical

HTTP Error 500.30 - ANCM In-Process Start Failure

The ASP.NET Core Module loaded your app in-process under IIS but it threw during startup and never came up.

What you see

HTTP Error 500.30 - ASP.NET Core app failed to start
ANCM In-Process Start Failure

What’s actually happening

IIS returns 500.30 and the site won't serve anything. The ASP.NET Core Module (ANCM) handed the request to your app's in-process worker, but the app crashed during boot — typically an exception in `Program.cs`/`Startup.cs` before the host finished building. The generic page hides the real exception; you have to turn on stdout logging or check Event Viewer to see what actually threw.

Common causes

  • Wrong or missing .NET runtime on the server — app targets a version the Hosting Bundle doesn't provide
  • Unhandled exception in `Program`/`Startup` (bad DI registration, config binding failure, missing service)
  • Bad connection string or missing config value read at startup throwing before the host starts
  • Missing or mismatched `web.config` / `ASPNETCORE_*` env vars, or `hostingModel` mismatch
  • A native or NuGet dependency missing from the publish output (incomplete `dotnet publish`)

How to fix it

  1. Turn on stdout logging — this is where the real error livesIn `web.config` set `stdoutLogEnabled="true"` and a writable `stdoutLogFile` path (e.g. `.\logs\stdout`), create the logs folder, recycle the app pool, and hit the site once. The exception and stack trace land in the log file.
  2. Check Windows Event ViewerApplication log under Windows Logs almost always has an 'IIS AspNetCore Module V2' entry with the unhandled exception. Faster than stdout if logging isn't wired up yet.
  3. Confirm the runtime is installed`dotnet --list-runtimes` on the server. The app needs the matching ASP.NET Core Runtime *and* the Hosting Bundle (which installs ANCM). A framework-dependent app with no runtime is a very common 500.30.
  4. Validate config and connection stringsIf startup reads a connection string or required config, a missing key throws before the host builds. Verify `appsettings.{Environment}.json` shipped and `ASPNETCORE_ENVIRONMENT` is set to what you expect.
  5. Try out-of-process to isolate ANCMTemporarily set `<aspNetCore hostingModel="OutOfProcess">`. If it starts, the failure is specific to in-process hosting (often a runtime/bitness mismatch). If it still dies, the bug is in your startup code.

Stop it recurring

Enable stdout (or Event Viewer) logging on deploy and pin the server's Hosting Bundle to the app's target framework so startup failures surface immediately.

Related errors