...

View Full Version : Sending error msgs to email?



Crash1hd
11-21-2003, 08:55 AM
Is this possible and if so how?? :) lol I was wondering if there was a way for an asp page to tell me the error in an email that it would send to me if there ever is one that doesnt slow the server down?

Is there also a program or a site that you can throw an asp page into that will check the page for errors and report back if there are any anywhere in the page!:o

A1ien51
11-21-2003, 01:27 PM
If you have the ability to send email you can try to catch the error and send it. The best thing you should do is maybe just log the errors into a file and deal with it that way.

I know it is probabbly easier to do this with .NET then ASP, but I have not worked with the error catching in ASP in great detail.

If I was not very busy today, I would try to play with this.

Eric

allida77
11-21-2003, 02:25 PM
On Error Resume Next

a = 12/0

If Err.Number <> 0 Then
sendErrEmail Err.description
End If



sendErrEmail would just be a method you need to create to pass the error description (or whatever other info you would like) that would handle the email.

oracleguy
11-21-2003, 05:33 PM
If you have the ability, another thing you can do is replace the default HTTP 500:100 (ASP Error) error page with your own asp one and it can pull the info out of the error object and send you e-mail. We use something like that at work on some of our stuff.

Roy Sinclair
11-21-2003, 06:46 PM
Originally posted by oracleguy
If you have the ability, another thing you can do is replace the default HTTP 500:100 (ASP Error) error page with your own asp one and it can pull the info out of the error object and send you e-mail. We use something like that at work on some of our stuff.

Exactly, one of the web servers I manage sends an email to me and to whoever is designated as responsible for that directory on that web server the first time each week that a particular 404 error occurs. Doing that helps reduce the number of 404 errors by making the authors aware of them. Note that we only send an email the first time it's found, otherwise we could have an email blizzard if there's a small typo on a heavily used page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum