Skip to content
Reto Hugi edited this page Apr 18, 2017 · 7 revisions

For every page request, Sitecore tries to map the url to a Sitecore item and sets this item as Context.Item. If no Context.Item could be resolved, Sitecore by default redirects to the static page /sitecore/service/notfound.aspx.

Default NotFound page

The same behavior is used for media requests, where no media item could be resolved. Sitecore describes different ways to handle custom error pages (see Handling HTTP 404). The easiest way is to create a custom pipeline processor and set the Context.Item to the desired item. But this does not work for media requests and not for IIS substatus codes (http://support.microsoft.com/kb/943891). In addition, it is only a solution for handling 404 errors and not for other status codes.

The Error Manager does not make use of a pipeline processor. It overrides the notfound.aspx (and in fact all other error pages) to a custom aspx page. The custom page resolves the current site and the current language from the url and invokes a local HTTP request to an item in Sitecore (which should be shown instead of the static content). The rendered Sitecore item will then be sent back to the client. In fact, the Module leverages the default sitecore behaviour for error pages and does not try to be clever by intercepting http requests in the http request begin pipeline (or the like). The module supports error handling for pages and media requests and allows to configure all kinds of (sub-)status codes generated by IIS. For more informations please see "[How it works] (How it works)".

Requirements

This module invokes local http requests with the same host name as the original client request, so the server needs access to it's own server url. I.e. if the current request is http://www.url.tld/lala, then the server must be able to make a local http request on http://www.url.tld too (if you do not have the server's hostname configured in a dns server, please make a hostfile entry on the server and map the host name to 127.0.0.1).

If you would like to use the manual deployments (see "[Installation] (Installation)") you need MSBuild. The provided solution works with version 4.0.30319 of the .NET framework.

Versioning

As of Version 8.0, the module follows semantic versioning with .. and the version number does not relate in any way to the supported Sitecore version.

Supported and tested Versions

See README.md for latest support.

Clone this wiki locally