ASP Classic & IIS 7: make error pages with me with errors

I know ASP, JMail, etc. I know where to edit HTML error pages in IIS 7, but I want to do this one more step:

How can I create an ASP error page that says something like "Error contacting customer support, please try again later."

And then he will send me an email with detailed error information for debugging?

+4
source share
3 answers

See instructions at http://support.microsoft.com/kb/224070 and User Errors in IIS 7.0 and Classic ASP
The first shows detailed error information for guests when an error occurs. You can change this to send an email containing detailed error information.
Secondly, this is setting up a custom error page in IIS7.

+5
source

If you have a specific aspx error page, you can add code to send mail to the code behind, or you can use Application_Error from global.asax.

0
source

If you can use the ASP and ASP.NET options, you can handle the Application_Error event and send the necessary information using the STMP class from System.Net. You can customize your own error page by manually editing the web.config file .

If you are tied to classic ASP and do not use .Net on the server side, you need to handle the error event directly on the server. You can read here how you develop handlers for IIS events using .Net.

0
source

Source: https://habr.com/ru/post/1381030/


All Articles