Brad Bansner
asked on
Classic ASP script errors cause IIS to generate e-mail message
Years ago, somebody helped me set this up, but now I can't remember how we did it.
I setup my website in IIS using (I think) the Custom Errors tab, so that ASP errors would call an ASP script, which itself contained code that generated an e-mail message, sending details of the error message to my e-mail address. This so that I would be aware if users are getting errors on the site, so I can be notified and look into the problem.
I assume there is a relatively easy way to do this? Thank you!
I setup my website in IIS using (I think) the Custom Errors tab, so that ASP errors would call an ASP script, which itself contained code that generated an e-mail message, sending details of the error message to my e-mail address. This so that I would be aware if users are getting errors on the site, so I can be notified and look into the problem.
I assume there is a relatively easy way to do this? Thank you!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Quick guess...
Move your 500-100.asp page to underneath your www folder.
(I've always placed these files into a folder under IIS, e.g., c:\inetpub\wwwroot\errors\ 400.asp)
Move your 500-100.asp page to underneath your www folder.
(I've always placed these files into a folder under IIS, e.g., c:\inetpub\wwwroot\errors\
ASKER
That didn't fix it. I thought maybe changing the message type to URL instead of File would do it, but I can't just reference a local path to it using C:\... etc., can I? It is making me put a valid URL in instead of a path name.
This is kind of ridiculous, no other ASP page on the server downloads, they all render, and this is in the same directory as other ASP scripts.
This is kind of ridiculous, no other ASP page on the server downloads, they all render, and this is in the same directory as other ASP scripts.
ASKER
I think I got this to work, hold on.
ASKER
I changed the Message Type from File to URL, and inserted this:
/500-100.asp
Now it works. However, I was hoping to use this script for several websites and would like to store it in a central location. But the user could be browsing a page at any number of different folder levels. Is it possible to use the type of URL above, except starting from a specific location, such as c:\... etc.?
/500-100.asp
Now it works. However, I was hoping to use this script for several websites and would like to store it in a central location. But the user could be browsing a page at any number of different folder levels. Is it possible to use the type of URL above, except starting from a specific location, such as c:\... etc.?
ASKER
500 / Default / "Internal Server Error"
I changed it to point to the default 500 ASP script. I figured I could just add my e-mail code to that. However, when I purposely generate an error, for some reason, my browser downloads the ASP script instead of loading it in the window! I can't understand that one.
You can try it here yourself, if you want:
http://www.bbdesign.com/error.asp
How can I make the ASP script render in the browser instead of downloading? Thank you!
1.jpg