Attribute Option

defaultRedirect mode

RemoteOnly

Description

Specifies a URL to redirect the user to

Specifies whether custom errors are enabled, disabled, or shown only on remote clients

Specifies that custom errors are enabled

Specifies that custom errors are disabled

Specifies that custom errors are shown only on remote clients

The default behavior for mode is RemoteOnly, meaning that the type of error page shown in Figure 4-14 will not be shown to remote users; instead, a custom error page will appear. The default page shown to remote users is really designed for developers. It explains how to view the details of the error by making changes to the customErrors section of Web.config. By setting the defaultRedirect attribute, the user can be redirected to a page that can, for example, notify the administrator of the site where an error occurred.

There is also an <error> subtag for the <customErrors> tag. The <error> subtag can occur multiple times. The two attributes in Table 4-6 are supported for the <error> subtag.

to a page that can, for example, notify the administrator of the site where an error occurred.

There is also an <error> subtag for the <customErrors> tag. The <error> subtag can occur multiple times. The two attributes in Table 4-6 are supported for the <error> subtag.

Table 4-6 : Attributes of the <error> Subtag

Attribute

Description

statusCode

Specifies an

error code

that

redirects a

browser to a

nondefault

error page

redirect

Specifies

the page to

redirect to

when the

error

specified in

statusCode

occurs

Was this article helpful?

0 0

Post a comment