How to Enable Detailed Error Pages for Your Website
In this article, we will explain how to enable detailed error pages for a website for troubleshooting purposes
Important Security Notice:
Detailed error pages should only be enabled temporarily for troubleshooting and debugging purposes.
Enabling detailed errors may expose sensitive information such as application paths, configuration settings, stack traces and other diagnostic details to website visitors. Once troubleshooting is complete, revert the settings to a secure configuration.
Steps to Enable Detailed Error Pages :
1.Locate your web.config file in the website root directory.
2.Open the file using a text editor.
3. Add or modify the following entries:
================================================
<configuration>
<system.web>
<customErrors mode=”Off” />
</system.web>
<system.webServer>
<httpErrors errorMode=”Detailed” />
</system.webServer>
</configuration>
==========================================
4. Save the file.
5. Reproduce the issue and review the detailed error message for troubleshooting.
Disable Detailed Errors After Troubleshooting (Recommended):
After the issue has been identified and resolved, revert the configuration to a more secure setting:
===================
<configuration>
<system.web>
<customErrors mode=”RemoteOnly” />
</system.web>
<system.webServer>
<httpErrors errorMode=”Custom” />
</system.webServer>
</configuration>
========================
Recommended: Do not leave customErrors=”Off” or httpErrors=”Detailed” enabled on production websites unless specifically required for temporary troubleshooting.