Originally posted on morethansharepoint:
Ok, lets get started.
So for my latest project I had to replace the default sharepoint error pages with a custom one. There are different types of error pages such as the ones for 404 and 500 errors. These are set by IIS and are basically simple html pages that are shown if the requested page is not found or other errors. But the error page that sharepoint uses is shown for errors that relate to sharepoint and shows correlation id and a simple message.
The default page for this type of error is located in the 14 hive /template/layouts/error.aspx.
Error.aspx inherits from Microsoft.Sharepoint.ApplicationPages.ErrorPage and by examining this in Reflector it’s relatively easy to see how it works. When an error occurs, the Item collection in the HttpContext gets filled by some keys such as ErrorText and ErrorCorrelationId. The error page simply gets these strings from the context (and also…
View original 150 more words