Remotely view error messages on IIS 7 (Windows 2008) and newer Print

  • 0

When a website page encounters a coding error on a IIS 7 (Windows 2008) or newer hosting server, it will by default show a generic "500 Internal Error" page.  You can override this behavior and return a detailed error message with debugging info by placing a web.config override file in the document root of your website with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

If you already have an existing web.config file, you will need to edit/insert the "httpErrors" directive under the tag.


Was this answer helpful?

« Back