Groups | Blog | Home
all groups > c# > april 2004 >

c# : Trap all errors


Jim Hughes
4/22/2004 4:09:18 PM
http://www.codeproject.com/dotnet/unhandledexceptions.asp will give you a
start, the email part is left up to you :)

[quoted text, click to view]

Andrew Banks
4/22/2004 10:41:43 PM
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
4/22/2004 11:16:59 PM
Cheers Jim.

Email's not a problem!


[quoted text, click to view]

Rick Spiewak
4/22/2004 11:39:37 PM
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).

[quoted text, click to view]

AddThis Social Bookmark Button