I am developing an asp.net mvc application in which I keep user credentials in session object. Which is initiated in global asax session start method. And have a statik class to get or set. How can I add a remember me functionality. Is it based on form authentication of asp.net?
Share
Yes, you probably want Forms Authentication. You use attributes like
[Authorize]to “protect” the controllers that you need to log in for, and provide a new Controller for log-on stuff. Don’t think this setup requires you to do much/anything in the global asax file or in the session.Here’s a start:
http://msdn.microsoft.com/en-us/library/ff398049.aspx
The tutorial assumes you used the “New MVC app” template, where login features are set up by default. Probably there are more tutorials on this topic, the search query “MVC Forms Authentication Tutorial” should get you there. Surely some of them include setting up the basic web.config stuff as well.