Custom Error Pages

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
 
P

Priya

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" />
 
K

Kenneth Keeley

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top