Hi.
I'm developing a web application, where one of the requirement is to automaticly logout user after 15 mins interval. I set this in my web.config
<forms loginUrl="Login.aspx" timeout="15"/>
where user will be automatically logout (to login page) after 15 minutes.
I have a listing to show which users is online.But this users will be shown when user is logged in and will remain as online for 15 minutes eventhough user click logout button (using login status).It seems like the when i click logout, the seesion time is still ongoing.
I want to clear the session time when i click the logout button. Means now session will timeout after 15 minutes,but when i click the logout button,i want the session to be ended before that 15 minutes.
I tried using these codes to end the timeout ;
Session.Clear();
Session.Abandon();
Session.RemoveAll();
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();
Roles.DeleteCookie();
but nothing is seems to be working.The timeout will only end after the 15 minutes.
I used in the event of LoginStatus1_LoggedOut and/or LoginStatus1_LoggingOut, but i cant figure out why its not working.
Can anyone help me on this?Any ideas/suggestion guys?