How To Preserve Login Information ?? [Resolved]

Posted by Akiii under C# on 10/4/2011 | Points: 10 | Views : 1417 | Status : [Member] | Replies : 2
Hi all,
I have a scenario in which :-
*** I have 1 login page and 1 default page
*** First the login page is presented, the user logs in and is redirected to the default page
*** In the default page, there is a logout button, pressing that logout button will redirect the user to login page again
*** Now, i want to preserve the login information in which until and unless user presses the logout button, he is never logged out, even if he/she closes the browser or the computer......just like dotnetfunda and gmail do ...

Please tell me how to accomplish this task ?

Thanks and Regards
Akiii




Responses

Posted by: SheoNarayan on: 10/4/2011 [Administrator] HonoraryPlatinum | Points: 50

Up
0
Down

Resolved
Hi Akii,

Its so easy, have you gone through the responses given to your post http://www.dotnetfunda.com/forums/thread6256-not-being-able-to-set-persistent-cookie-.aspx.

The easiest way is to use Forms Authentication rather than creating your own cookies, use this article - http://www.dotnetfunda.com/articles/article114.aspx , in case you have any problem in implementing this watch this video - http://fundoovideo.com/video/55/how-to-implement-forms-authentication-security-in-aspnet that has a complete walk through on how to implement forms authentication in ASP.NET.

Hope this helps.

Thanks



Regards,
Sheo Narayan
http://www.dotnetfunda.com

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 10/4/2011 [Member] Bronze | Points: 25

Up
0
Down
After viewing the above links recommended by you.......i created a project and its working fine....

thank you very much for your help Sir..

Regards
Akiii

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response