Thursday, April 18, 2024

How to enable detailed error information for IIS and ASP.NET

Abstract: This short how to explains how to enable better IIS error messages

By default, IIS and therefore ASP.NET hide detailed error information to prevent revealing sensitive information about your web application and shows only an error (e.g. a 500 one). To change that you need to edit the web.conf and add the following values:

<configuration>
  <system.web>
    <customErrors mode="Off" />
  </system.web>

  <system.webServer>
    <httpErrors errorMode="Detailed" />
  </system.webServer>
</configuration>

Restart your IIS after that change.

Make sure to change these settings back, once you finished troubleshooting the issue! Otherwise it might revealing sensitive information.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

35FollowersFollow
- Advertisement -

Latest Articles