Unhandled Exceptions - ASP.Net

T

tberry

I have just begun reviewing how to create a custom error page for
unhandled exceptions. I found if I set custom HTML pages in Web.config
those work fine. But referencing .aspx pages in Web.config produced the
standard exception page.

I then used Server.Transfer(name.aspx); in the Application_Error method
in Global.asax.cs. This of course worked. My question is why didn't
Web.config redirect to the aspx page? The code in Web.config is:

<customErrors mode="On" defaultRedirect="GenericError.aspx">
</customErrors>

I am using VS.Net 2003

Thank you
T Berry
 
D

Darren Kopp

Did you try

<customErrors mode="On" defaultRedirect="GenericError.aspx" />

I would use that since you don't define specific errors. Also, you
don't have any code in your GenericError.aspx that would throw an
exception do you?

-Darren Kopp
http://blog.secudocs.com/
 

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

Similar Threads


Top