Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    51° 03' -78" N -114° 05' 72" W
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sending error msgs to email?

    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!
    Last edited by Crash1hd; 11-21-2003 at 08:58 AM.

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    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
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Cincinnati, OH
    Posts
    545
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    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.
    does this sig match?

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    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.
    OracleGuy

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •