Larry Brister
asked on
ASP.Net auto logut
We have a AsP.Net web site
Uses a MasterPage
VB Code...
How is the best way to log a person out after 15 minutes inactive
and redirect to Login.aspx
Uses a MasterPage
VB Code...
How is the best way to log a person out after 15 minutes inactive
and redirect to Login.aspx
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
You can just set the settings in your global.asax file.
refresh the page to login page after session timeout in page-load event.
protected void Application_BeginRequest()
{ Response.Headers.Add("Refresh", Convert.ToString(Session.Timeout * 15)); }
Orrefresh the page to login page after session timeout in page-load event.
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
Response.AppendHeader("Refresh", ((Session.Timeout * 60) + 5).ToString() + "; Url=login.aspx");
}
IdleTimeOut1.rar