title: Singleton and HttpApplicationState
body: <p>In a web app, I need to have only one instance of a class called ProcessManager.  One way is to make it a singleton.  The other way is to use the HttpApplicationState to make sure I always access the same instance, like this:</p>
  
  <pre><code>public static ProcessManager ProcessManager
          {
              get 
              {
                  HttpApplicationState applicationState = HttpContext.Current.Application;
                  if (applicationState["ProcessManager"] == null)
                  {
                      applicationState["ProcessManager"] = new ProcessManager();
                  }
  
                  return (ProcessManager)applicationState["ProcessManager"];
              }
          } 
  </code></pre>
  
  <p>Which method is better and why?</p>