title: HTTPContext.Current.Session is nul in SignalR...need alternate to Session state while using SignalR
body: <p>Recently, I have downloaded and integrated the sample ChatJS MVC app to my application from <a href="http://www.chatjs.net/" rel="nofollow">http://www.chatjs.net/</a> site which uses ChatJs and SignalR2.0. I am trying to use my application session values (userid) in ChatHub.cs class (which inherits from SignalR Hub class). In this class when I tried to access Session UserId of my application, I am getting an error as "Object reference not set to an instance of an object", it is returning null. I am able to access the same UserId session value in HomeController.cs (Controller class).</p>
  
  <p>I saw in the below link which talks about my problem (also pasted the text after the link) and looks like SignalR </p>
  
  <p>doesn't support the ASP.NET Session state.
  <a href="http://www.asp.net/signalr/overview/signalr-20/troubleshooting-and-debugging/troubleshooting" rel="nofollow">http://www.asp.net/signalr/overview/signalr-20/troubleshooting-and-debugging/troubleshooting</a></p>
  
  <p>"HTTPContext.Current.Session is null.This behavior is by design. SignalR does not support the ASP.NET session state, since enabling the session state would break duplex messaging."</p>
  
  <p>In my application so far we were able to use the Session values without any problem. I am stuck here as  I need do so many db calls and for which I need to pass User session ID and other session values. Normally we rely on Session to provide the user-specific information.</p>
  
  <p>Is there any alternative to Session OR any other way to get the User-specific information like UserId,etc. Need your help here at the earliest.</p>
  
  <p>Thanks in Advance.</p>