Trap all errors

Discussion in 'ASP .Net' started by Andrew Banks, Apr 22, 2004.

  1. Andrew Banks

    Andrew Banks Guest

    Is it possible to trap all errors within a web app and do the following

    Send the user to another page "Error.aspx"
    Send an email to myself with the filename and as much information about the
    error as possible.

    I take it this would be done in the Global.asax file but not too sure where
    to start.

    Any ideas greatly appreciated!
    Andrew Banks, Apr 22, 2004
    #1
    1. Advertising

  2. Andrew Banks

    Jim Hughes Guest

    http://www.codeproject.com/dotnet/unhandledexceptions.asp will give you a
    start, the email part is left up to you :)

    "Andrew Banks" <> wrote in message
    news:HSXhc.1414$...
    > Is it possible to trap all errors within a web app and do the following
    >
    > Send the user to another page "Error.aspx"
    > Send an email to myself with the filename and as much information about

    the
    > error as possible.
    >
    > I take it this would be done in the Global.asax file but not too sure

    where
    > to start.
    >
    > Any ideas greatly appreciated!
    >
    >
    Jim Hughes, Apr 23, 2004
    #2
    1. Advertising

  3. Andrew Banks

    Andrew Banks Guest

    Cheers Jim.

    Email's not a problem!


    "Jim Hughes" <> wrote in message
    news:...
    > http://www.codeproject.com/dotnet/unhandledexceptions.asp will give you a
    > start, the email part is left up to you :)
    >
    > "Andrew Banks" <> wrote in message
    > news:HSXhc.1414$...
    > > Is it possible to trap all errors within a web app and do the following
    > >
    > > Send the user to another page "Error.aspx"
    > > Send an email to myself with the filename and as much information about

    > the
    > > error as possible.
    > >
    > > I take it this would be done in the Global.asax file but not too sure

    > where
    > > to start.
    > >
    > > Any ideas greatly appreciated!
    > >
    > >

    >
    >
    Andrew Banks, Apr 23, 2004
    #3
  4. Andrew Banks

    Rick Spiewak Guest

    You could also use the Exception Management Application Block, catch
    unhandled exceptions, and publish them using a custom publisher. This would
    have the advantage of giving you the ability to publish to the application
    log simultaneously, while your custom publisher might screen exceptions and
    only email certain ones (or just send an alert so the administrator could go
    back and check the log).

    "Andrew Banks" <> wrote in message
    news:LnYhc.1446$...
    > Cheers Jim.
    >
    > Email's not a problem!
    >
    >
    > "Jim Hughes" <> wrote in message
    > news:...
    > > http://www.codeproject.com/dotnet/unhandledexceptions.asp will give you

    a
    > > start, the email part is left up to you :)
    > >
    > > "Andrew Banks" <> wrote in message
    > > news:HSXhc.1414$...
    > > > Is it possible to trap all errors within a web app and do the

    following
    > > >
    > > > Send the user to another page "Error.aspx"
    > > > Send an email to myself with the filename and as much information

    about
    > > the
    > > > error as possible.
    > > >
    > > > I take it this would be done in the Global.asax file but not too sure

    > > where
    > > > to start.
    > > >
    > > > Any ideas greatly appreciated!
    > > >
    > > >

    > >
    > >

    >
    >
    Rick Spiewak, Apr 23, 2004
    #4
    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. Sean Nolan

    Trap "connection pool" errors

    Sean Nolan, Jul 11, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    392
    David Browne
    Jul 11, 2003
  2. Rolf Kemper

    Trap run time errors in XSLT

    Rolf Kemper, Oct 20, 2004, in forum: XML
    Replies:
    0
    Views:
    467
    Rolf Kemper
    Oct 20, 2004
  3. SalP
    Replies:
    3
    Views:
    385
    bruce barker \(sqlwork.com\)
    May 17, 2006
  4. Peter A. Schott

    Best way to trap errors in ftplib?

    Peter A. Schott, Jan 11, 2005, in forum: Python
    Replies:
    1
    Views:
    318
    Mark McEahern
    Jan 12, 2005
  5. Ramdas
    Replies:
    0
    Views:
    236
    Ramdas
    Jun 19, 2007
Loading...

Share This Page