How can I specify a default custom error page in Web.config?

Responsive Ad Header

Question

Grade: Education Subject: Support
How can I specify a default custom error page in Web.config?
Asked by:
60 Viewed 60 Answers

Answer (60)

Best Answer
(321)
You can set a default custom error page by adding the `defaultRedirect` attribute to the `` element in your Web.config file and providing the path to your custom error page (e.g., `/ErrorPages/GenericError.aspx`). This page will be displayed for any unhandled exception if no specific error page is defined.