ASP Error Handling Configuration
As mentioned in Chapter 5, IIS5.0 and later
redirects the user's browser to a custom error page,
500-100.ASP, any time an error occurs in your
application (unless you have inserted into your code the On
Error
Resume Next
statement). The
server's redirection (through an internal call to the Transfer
method of the Server object) occurs in reaction to a custom
application error, which is a specific version of the generic
Internal Server Error (HTTP Response Status 500). Similar
redirections occur within the server for all errors (see Figure 4.7).
Figure D.7. Custom Errors tab of the Properties page
You can change the page to which IIS transfers execution in response to an error in your application, by performing the following steps:
Right-click the application whose error page you want to change and select Properties.
Click on the Custom Errors tab of the Properties page (see Figure 4.7).
Select the error whose Error Page you wish to change and click the Edit Properties button (see Figure 4.8).
Enter a new URL for the page you wish IIS to execute in response to the selected error type and click on the OK button.
Figure D.8. Error Mapping Properties dialog
Once changed, the server will redirect execution to the selected URL. You can also further customize the server's ...
Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.