How to maintain user's session in ASP.NET MVC application?
I am working on migrating the existing ASP.NET application to MVC. Earlier we used to maintain the user sessions and can be accessed in whatever page we want.
Ex: Session["UserType"] = var_UserMastersBO.UserType.ToString();
We set this session Global.asax file.
In case if there are restricted pages based on the userType, we check this if condition in the page load.
Cal we implement the same in MVC?
Appreciate your responses. Thanks开发者_如何学运维
ASP.NET MVC is built on top of the ASP.NET so you can use every feature of ASP.NET like Session Membership Caching in MVC.
精彩评论