Hi
I gases you are in ASP.NET plat form so you can use
timeout
tag from
authentication
element follow of code demonstrate :
<authentication mode="Forms">
<forms loginUrl="Login.aspx" protection="All" timeout="3000">
</forms>
</authentication>
So maybe your application is hosted in IIS don`t worry we have a other solution for it please follow these steps:
1) Please open your IIS with this command "inetmgr" in run
2) Expand Default Web site and Right Click on your Web Site/Proerties
3) In the Web Site Properties dialog box go to ASP.Net tab click on Edit Configuration button
4) In the ASP.Net Configuration Setting dialog box go to State Management Tab and Increase the Session timeout (minutes)
Of course you should use
FormsAuthentication.SignOut
you can get more information about it here: http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.signout.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-2.
public void Login_OnClick(object sender, EventArgs args)
{
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();
}
So you can use these method for sign out when the user refresh the page ;)
Best Regards.