Disabling Windows Custom Error Messaging
By default, our Windows hosting accounts display a custom error when applications generate an exception. We display a generic error because the detailed error messages allow a malicious user to obtain sensitive information.
To troubleshoot the error, you can modify your web.config file and specify that a detailed error message displays. A detailed error message helps you to locate the specific code that is causing the issue.
CAUTION: The code samples we provide below do not constitute a complete web.config file. Do not replace your existing web.config file with the code we provide. Before changing your web.config file, we recommend creating a backup.
Displaying Custom Error Messages / Enabling Detailed Errors on IIS 6
Use the sample code below to display custom error messages on IIS 6:
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
</configuration>
Displaying Custom Error Messages / Enabling Detailed Errors on IIS 7
Use the sample code below to display custom error messages on IIS 7:
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
</configuration>
What Is Medium trust level and how does it affect my hosting account?
What server objects are supported on Windows shared hosting servers?
What ASP.NET runtime version should I choose?
What is ASP.NET AJAX?
Is Parent Path Enabled on Shared ASP Hosting?
Creating an ASP.NET 2.0 Personal Web Site
Have a question about the content of this article?
Sending Message...
0 min expected wait time