Skip to content
aquasonic edited this page Dec 17, 2012 · 3 revisions

For each status code (403, 404, 500), there is a custom aspx page in /sitecore modules/web/error manager/. In the configuration, the error pages for ItemNotFound (404), LayoutNotFound (500) and NoAccess (403) are overridden to point to the custom error pages. The custom error page afterwards tries to resolve what to display to the user. The process is described as follow:

  1. Resolve the current SiteContext and the current Language based on the current raw url.
  2. Check if there is an item in Sitecore under the current site in the current language (is also checks the available languages configuration, see chapter Available languages).
    • If no valid item is available, check if there is a valid item in the site's default language.
    • If no valid item is available, take the configured static file (Sitecore default error page).
  3. Make a http request to the resolved error item or the static file
  4. Set the status code
  5. Respond with the raw data back to the client

The following image illustrates the process:

Resolving Process

If no Sitecore item could be resolved (i.e. because the item does not exist, or no valid language version is available), the default Sitecore error page is shown. These static pages are as well part of the Error Manager module, because the default Sitecore error pages respond with a status code other than 200 (this is correct, because i.e. the notfound.aspx should response 404 status code). However, since the Error Manager needs to do a http request on this page, it must response 200 status code. The status code is afterwards set by the Error Manager.

If you would like to handle other status codes than the defaults (403, 400 and 500), you can easily add other error pages to the solution and do a manual deployment to your Sitecore installation (see "[Installation] (Installation)"). Please have a look at the available 403.aspx, 404.aspx or 500.aspx to get an idea on how to implement a new status code error page. Please see "[Configuration] (Configuration)", section Configure other (sub-)status codes on how to configure new status codes in IIS.

Clone this wiki locally