To Redirect your page to more appropriate error page for the Client
Go to Web.config file and add redirection location in customErrors tag
For example:
"<"customErrors defaultRedirect="http://hostName/applicationName/errorStatus.htm" mode="On" "/>"
""CUSTOMERRORS ?>
Although you can reference a default error page in the value of the defaultRedirect
attribute in the
redirect to based on the HTTP error code that is raised.
The
For example:
"<"customErrors defaultRedirect="http://hostName/applicationName/errorStatus.htm" mode="On" "/>"
"<"error statusCode="404" redirect="filenotfound.htm" "/>"
The mode attribute includes the following settings:
• On: Unhandled exceptions redirect the user to the specified defaultRedirect page. This mode is used mainly in production.
• Off: Users receive the exception information and are not redirected to the defaultRedirect page. This mode is used mainly in development.
• RemoteOnly: Only users who access the site on the local computer (by using localhost) receive the exception information. All other users are redirected to the defaultRedirect page. This mode is used mainly for debugging.
"
No comments:
Post a Comment