In the past I have often used the Application_End event of the "global.asax" file. However, I have moved some of my code into a reusable library. Ideally I would like to dynamically register a handler for the application end event to do some clean-up routines.
Is there a way to do this? If not, what alternatives should I consider?