Unhandled Exceptions - ASP.Net

Discussion in 'ASP .Net' started by tberry@vhb.com, Mar 7, 2006.

  1. Guest

    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
    , Mar 7, 2006
    #1
    1. Advertising

  2. Darren Kopp Guest

    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/
    Darren Kopp, Mar 7, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. terry

    Unhandled Exceptions & Framesets

    terry, Jul 2, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    404
    Bassel Tabbara [MSFT]
    Jul 3, 2003
  2. Alan Silver

    How do I catch unhandled exceptions

    Alan Silver, Mar 20, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    1,707
    Alan Silver
    Mar 23, 2006
  3. Winista

    Unhandled Exceptions thrown

    Winista, Mar 22, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    384
    Winista
    Mar 22, 2006
  4. Amil Hanish
    Replies:
    0
    Views:
    536
    Amil Hanish
    Apr 13, 2006
  5. Warren Tang
    Replies:
    1
    Views:
    856
    Warren Tang
    Sep 23, 2008
Loading...

Share This Page