How do I enable custom error pages in ASP.NET using Web.config?

Question

Grade: Education Subject: Support
How do I enable custom error pages in ASP.NET using Web.config?
Asked by:
63 Viewed 63 Answers

Answer (63)

Best Answer
(326)
To enable custom error pages in ASP.NET, you need to add the `` element to your Web.config file. Within this element, set the `mode` attribute to `On` or `RemoteOnly` to activate custom error handling. You can then specify the default page for all errors or define specific pages for different HTTP status codes.