i have a controller action being called using an ajax request, but when i tried to access session (HttpContext.Session["key"]), i dont have any of my session keys populated. How can i have access to my session keys when i make a call using ajax.
The available Session in the controller is the HttpSessionStateBase. You can access it using either Session[param] or base.Session[param] if your controller inherits from Controller. But this may be useless with Ajax if you have it set cookieless.
Sign up to request clarification or add additional context in comments.
Comments
0
It's difficult to figure out why your session is not getting populated for Ajax calls. I can only tell you that your session should get populated for Ajax calls.