I want to access user session values outside of the controller where HttpContext is null. Can we read data from the session even when HttpContext is null if we know the session ID?

Tried to create a singleton class and set the values but its not solving our purpose.

Suppose I have UI project which is of ASP.NET MVC type. There I have a SignalR handler. I want access some data which is stored in session when I get a message at SignalR handler.

1 Answers

Rupak On

you can use Session.Add("Name", Name of item you need); while login and you can access it in any page by Session["Name"].