first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

MCAD/MCSD Notes: Chapter 6, Lesson 2; Using Error Pages

Lesson 2: Using Error Pages

The purpose of this lesson is to introduce the concept of the Error Page and highlight the role Internet Information Server (IIS) plays in error-handling configuration.

One common example of this "whole class" is the 404, "file not found" error. This error, by definition, cannot be handled within an ASPX page since no page was found to process.

Application-wide error page configuration can be defined in the Error Mapping Properties dialogs in IIS, the Web.config file of the ASP.NET application and setting the ErrorPage attribute of the @ Page directive of a given ASPX page.

This guidance may apply to ISS 6.x and above but we may need to be aware that earlier versions of IIS might not have ASP.NET loaded or 'prioritized in the HTTP pipeline' and will intercept errors before the Web.config file is consulted.

For more information on HTTP error codes, please see:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

This appears to be the 'catch-all' error and handling this error should be the bare minimum for 'professional' ASP.NET applications.

Note that this declaration causes the error page to be loaded by redirection. All error information will be lost after redirection (so Server.GetLastError() will be undefined).

mod date: 2005-06-09T00:03:36.000Z