I'm writing an http module, and I want to add a method that is called when (and only when) the appdomain gets recycled. I don't want to add anything to global.asax, I want to do it programatically within the http module.
However, there doesn't seem to be an End
event on the instance of HttpApplication
passed in the module's Init
method. How can I subscribe to the Application_End
event?