One of our ASP.NET Core sites fails immediately after deployment with an IIS 502.5 Process Failure. The same build runs locally, and the application pool starts, but the site never serves a page.
I’m trying to narrow down whether this is a hosting bundle mismatch, a problem launching the app, or something in the deployed configuration. Which logs or event viewer entries have been most useful for diagnosing this?
The server was recently rebuilt, so I’m especially curious whether there’s a common prerequisite people forget to install or verify after setting up IIS.
A 502.5 response usually means IIS could not start the ASP.NET Core process for the site, or that process exited during startup. Start with the server-side logs rather than browser or network settings.
Check the Application log
Open Windows Event Viewer and look under Windows Logs > Application for errors around the time of the request. Entries from IIS AspNetCore Module, .NET Runtime, or your application may name the missing dependency, configuration problem, or startup exception.
Capture startup output
If the event log does not explain it, temporarily enable
stdout loggingin the site’sweb.configby settingstdoutLogEnabledtotrueand choosing a log file path. Make sure theapplication pool identitycan write to that folder. Reproduce the error, inspect the newest log, then turn stdout logging off; the files can grow quickly.Try starting the published app directly
From the
published application folder, run the app’s executable or usedotnet YourApp.dll, depending on how it was published. A startup exception shown in the console often points straight to the cause. Also confirm that the server has the correctASP.NET Core Hosting Bundleand matching .NET runtime installed, especially after a deployment or runtime upgrade.If it runs manually but fails under IIS, compare the app pool identity’s permissions and check the site’s hosting configuration. For an out-of-process app, a hard-coded listening URL or port can also interfere with the address IIS provides at startup.