title: How to handle Application_End event from outside global.asax
body: <p>We can attach to this event from global.asax file creating method with name Application_End(). But I need to attach to it like this</p>
  
  <pre><code>HttpContext.ApplicationInstance.ApplicationEnd+=OnApplicationEnd;
  </code></pre>
  
  <p>Is there any way to do it?</p>