March 2008
Intermediate to advanced
816 pages
24h 25m
English
In the preceding examples, IIS 7.0 sends the contents of the file as the custom error response. IIS 7.0 has two other ways to respond to an error: by executing a URL and by redirecting the request.
If you want to do a bit more in your custom error, such as sending an e-mail or logging the error to a database, you can execute a URL. Doing so allows you to execute dynamic content such as an ASP.NET page. The following example replaces the 404 custom error. Then IIS 7.0 will execute /404.aspx whenever a 404 error occurs.
<httpErrors> <!-- default custom error for 401 errors --> <!-- <error statusCode="404" prefixLanguageFilePath="c:\inetpub\custerr" path="404.htm" />--> <!-- ExecuteURL replaces default file response ...
Read now
Unlock full access