CustomErrors -WebConfing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Custom Error below..!!
But when i try it it doesn't work.
Am i suppose to make any changes in IIS for this to Work?
And the Error pages for example "AccessDenied.aspx" where should they be PUT?

<customErrors defaultRedirect="ErrorPage.aspx" mode="On">
<error statusCode="500" redirect="servererror.aspx" />
<error statusCode="404" redirect="filenotfound.aspx" />
<error statusCode="403" redirect="AccessDenied.aspx" />
</customErrors>
 
Patrick,

You'll need to remove your <error ....> tags for the custom error to go to
your defaultRedirect page.

If you need custom handling for 500, 404, 403 etc.. along with a generic
error messge you'll need to write that code in ErrorPage.aspx (check the
HttpResponse.Status, HttpResonse.StatusCode, and
HttpResponse.StatusDescription documentation)
 
Back
Top