Trap all errors

A

Andrew Banks

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!
 
R

Rick Spiewak

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).
 

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,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top