Custom Error Handler
Configures an error handle object to be called when an HTTP error occurs.
Arguments
- code
- The HTTP status code to catch.
- type
- The assembly-qualified full type name of the class to invoke when the HTTP error occurs. This type must implement the IRewriteErrorHandler interface.
Remarks
If an error with the given HTTP status code occurs, then an instance of the type specified in type will be created and executed. The type specified must implement the IRewriteErrorHandler interface.
Examples
<error-handler code="500" type="MyNamespace.Errors.MyServerErrorHandler, MyAssembly” /> <error-handler code=”404″ type=”MyNamespace.Errors.
MyNotFoundErrorHandler, MyAssembly” />
MyServerErrorHandler, MyAssembly” />
<error-handler code=”404″ type=”MyNamespace.Errors.