Why not jump to TimeOut.htm

A

ad

I want to redirect to a TimeOut page when a user didn't access web site for
a while.
I write a BasePage class, and all web page in my project inherent the
BasePage like below.
But I foundwhen user did not access web site for a while, and then access
web page again, it was redirrect the the
LoginUrl which is set in web.config.
Why, I think it will redirect to TimeOut.html



//---- the LoginUrl in web.config
<authentication mode="Forms">
<forms name="HealthCookie" loginUrl="Home.aspx">



//--------- the BasePage
public class BasePage :System.Web.UI.Page
{
public BasePage()
{ }
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (Context.Session!=null)
if (Session.IsNewSession)
{
Response.Redirect("TimeOut.html");
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top