Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Which is the best way to create a custom error page in SharePoint ?
Depends what you mean by "best". The easiest way: In your web.config file: in the <system.web> section, modify the customErrors element to:
<customErrors mode="On" defaultRedirect="/Pages/MyCustomErrorPage.aspx" />
Write a HttpModule to handle the onerror event, and redirect to the custom error page.
Required, but never shown