title: ASP.NET HttpApplication local storage
body: <p>I need some HttpApplication local storage. I thought the ApplicationState was the place for this, but apparently this may be shared across HttpApplication instances in an Appdomain.</p>
  
  <pre><code>   public class MyHttpModule : IHttpModule
      {
          private object initializingLock = new object();
  
          private static HttpApplication last;
  
          public void Init(HttpApplication context)
          {
              lock (initializingLock)
              {
                  // always is false, as expected
                 if (last == context) 
                 { 
                 }
  
                 // is true for 2nd HttpApplication in AppDomain!
                 if (last != null &amp;&amp; last.Application == context.Application)                    
                 {                   
                 }
  
                 last = context;
              }
          }
       }
  </code></pre>
  
  <p>What's the best blace to use to store some data that's per HttpApplication that other stuff can access? </p>