I\'ve just discovered you can\'t access the current session within the SignalR Hub.
Simplified my scenario: I\'ve tried to write a chat.
The name of the curr
One the best approach is to use Cookie instead of session. because as mentioned above , You can not use session . so When user login to your system, put its unique identifier(such as username) in cookie . then work with cookie where ever you want access session . such below...
public class CustomUserIdProvider : IUserIdProvider
{
public string GetUserId(IRequest request)
{
return request.Cookies["ODPUserID"].Value;
}
}