In ASP.NET there is the Application_EndRequest event in global.asax. In classic ASP however there is no such equivalent event in global.asa
Is there any other built in way of handling the end request event, or any way of somehow hooking into IIS to accomplish the same thing?
Best Answer
We use a particularly twisted technique to execute code after the request has completed. Consider the following snippet:
When the request ends, ASP unloads all of the global variables, including
EndRequestHandlerInstance
, which calls it'sClass_Terminate
method. If you place this into an include file that's used by every page on the site, it should serve as your global end request handler.