Custom Error Pages

  • Thread starter Thread starter Kenneth Keeley
  • Start date Start date
K

Kenneth Keeley

Hi
I have created a Web.config file with theses settings:
<customErrors mode="RemoteOnly"
defaultRedirect="/errorpages/generic.aspx">
<error statusCode="403" redirect="/errorpages/noaccess.aspx" />
<error statusCode="404" redirect="/errorpages/filenotfound.aspx" />
</customErrors>

If a user tries to go to a folder that does not exist then I get my default
HTML error page for directory not found.
If a user tries to go to an aspx page in a folder that does not exist that
get a horrible error page telling them that of A Runtime Error and that they
should changes the Web.config error mode to off to see the Error. How can I
make it that they go to one of my nice looking Error pages.

Thanks
 
Hi Kenneth,
Have u navigated to /errorpages/filenotfound.aspx to
ensure that this page loads up okay by itself? You might
be getting an error because of some code on this page. To
check if this is a case, create a test "filenotfound.html"
and set web.config so that 404 status takes u
to /errorpages/filenotfound.html instead of the aspx page.
If this works okay, u know there is something wrong with
ur particular aspx page.
-----Original Message-----
Hi
I have created a Web.config file with theses settings:
<customErrors mode="RemoteOnly"
defaultRedirect="/errorpages/generic.aspx">
<error statusCode="403"
redirect="/errorpages/noaccess.aspx" />
<error statusCode="404"
redirect="/errorpages/filenotfound.aspx" />
 
Priya said:
Hi Kenneth,
Have u navigated to /errorpages/filenotfound.aspx to
ensure that this page loads up okay by itself? You might
be getting an error because of some code on this page. To
check if this is a case, create a test "filenotfound.html"
and set web.config so that 404 status takes u
to /errorpages/filenotfound.html instead of the aspx page.
If this works okay, u know there is something wrong with
ur particular aspx page.

The page seems to work fine but the fault occurs if you try to get to a
folder called publications
Why would this be the case.
 
Back
Top