title: SignalR and HttpContext/Session
body: <p>I understand why SignalR doesn't give you <a href="https://stackoverflow.com/questions/7854663/signalr-doesnt-use-session-on-server">access to the HttpContext</a>. However, this is quite problematic for us. Let me explain:</p>
  
  <p>Our application is a Multi-Tenant application where the user chooses the environment while logging in. This basically registers the ConnectionStringName in the HttpSession. In our SignalR Hub, we need to access the database on <code>Disconnect</code>. But this is not possible because we have no HttpContext at this point and cannot determine the environment to write to.</p>
  
  <p>Can anyone provide us with a suggestion how to solve this problem? We're a bit stuck on this one.</p>
  
  <p><strong>EDIT</strong>: Bonus point if your solution works in a Load-Balanced environment.</p>