View Single Post
 
Old February 11th, 2008, 02:55 PM
Lee Dumond's Avatar
Lee Dumond Lee Dumond is offline
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Quote:
quote:Originally posted by tectrix


Okay, I’ve this code in my Global.asax to send error details to me . I got this code from some online article and it works fine. Does it hurt if I use this along with Health Monitoring System or should I configure SimpleMailWebEventProvider with SqlWebEventProvider if I want errors/events details be send to me along with being logged in the DB?
It doesn't hurt at all. However, it would be a bit redundant if you were using SimpleMailWebEventProvider to send errors, along with handling the app-level event in Global.asax. Of course, you could configure SimpleMailWebEventProvider to NOT send errors, but to send other stuff, like Audits, Custom Events, and so on; and rely on Application_Error to send the errors.

The advantage of using Global.asax is that it is easier to customize exactly what info you want included in the email, and to format it the way you want. The advantage of using SimpleMailWebEventProvider is that it can notify you of other HM events besides errors, and it's easier to specify exactly what kind of events/errors you want to be notified about and under what conditions.