Thank you for visiting!

Please consider subscribing to the RSS feed or following me on Twitter.

Real Error Messages from IIS

If you want real error messages for your web application in the development environment, make sure you do this:


  1. Go to your web application under Sites and choose .NET Error Pages in the right pane.
  2. Click Edit Feature Settings in the most right pane.
  3. Make sure Mode is set to Off:
    IIS: Error Pages Off

In Web.Config:

Make sure the following httpErrors element is in the <system.webServer> node for the application, with errorMode set to Detailed and existingResponse set to PassThrough:

<httpErrors errorMode="Detailed" existingResponse="PassThrough">
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" path="/404" responseMode="ExecuteURL" />

The 404 handling in above code is just for good measure.

Now you should once again get real .NET error messages from IIS.

To the top