---
title: "What should I check first when an IIS site returns 502.5?"  
description: "What should I check first when an IIS site returns 502.5?"  
author: "Manish Sharma"  
published: 2026-10-04  
updated: 2026-10-11  
canonical: https://www.mindstick.com/forum/162234/what-should-i-check-first-when-an-iis-site-returns-502-5  
category: "ASP.NET Core Hosting"  
tags: ["iis", "asp.net core", "Deployment", "troubleshooting"]  
reading_time: 2 minutes  

---

# What should I check first when an IIS site returns 502.5?

One of our ASP.NET Core sites fails immediately after deployment with an IIS **[502.5 Process Failure](https://www.mindstick.com/forum/34540/ai)**. 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.

## Replies

### Reply by Ravi Vishwakarma

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 logging` in the site’s `web.config` by setting `stdoutLogEnabled` to `true` and choosing a log file path. Make sure the `application pool identity` can 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 use `dotnet 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 correct `ASP.NET Core Hosting Bundle` and 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.


---

Original Source: https://www.mindstick.com/forum/162234/what-should-i-check-first-when-an-iis-site-returns-502-5

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
