What is 'customErrorMode' in web.config and why might I want to disable it?

Responsive Ad Header

Question

Grade: Education Subject: Support
What is 'customErrorMode' in web.config and why might I want to disable it?
Asked by:
75 Viewed 75 Answers

Answer (75)

Best Answer
(393)
The 'customErrorMode' attribute in web.config controls how ASP.NET handles unhandled exceptions. When set to 'Off', ASP.NET displays the full error details (including stack traces) to the user. Disabling it is often done for debugging purposes or to provide more detailed error information to developers, but it's generally not recommended for production environments due to security concerns.