February 21 2014

How to enable details error information in IIS and ASP.NET

Tagged Under :

By default, IIS and ASP.NET hide detailed error information to prevent revealing sensitive information about your web application.
Sometimes we need to see error details (think shared hosting) to debug our coding.

To display the error message. Add these entries to your web.config file to disable generic errors:
<?xml version="1.0" encoding="UTF-8"?>
    <customErrors mode="Off"/>
    <httpErrors errorMode="Detailed" />
Now you can try refresh the page and you will be able to see the error message like below:

Make a Comment