Does i need to apply Sessions in ASP.NET for log in/log out if im using SimpleMembership in MVC? -
i new web development so, need implement sessions while using simplemembership having problem button after logs out. goes previous page instead of login. added code below in global.ascx. works perfect now!!
response.cache.setcacheability(httpcacheability.nocache); response.cache.setexpires(datetime.utcnow.addhours(-1)); response.cache.setnostore();
so query is, can run application without sessions in there authentication of users i.e. there user accounts , login , logout functionality there.
you can login , logout using default simplemembership
functions:
for login:
bool success = websecurity.login(form["username"], form["password"], false);
for logout:
websecurity.logout();
for details refer msdn link here
Comments
Post a Comment