FormsAuthentication timeout issue
<pre><code>protected void Page_Load(object sender, EventArgs e)
        {
            if (HttpContext.Current.User.Identity.IsAuthenticated)
            {
                Session["User"] = "Authenticated";
                Session["Username"] = HttpContext.Current.User.Identity.Name;
                Response.Redirect("HomePage.aspx");
            }

        }

protected void btnSubmit_Click(object sender, EventArgs e)
        {
           int recordExistCount = fc.Authenticate(txtUsername.Text.Trim(), txtPassword.Text.Trim());
           if (recordExistCount == 1)
           {
               Session["User"] = "Authenticated";
               Session["Username"] = txtUsername.Text.Trim();
               fc.IsOnlineRecord(Session["Username"].ToString(),true);
               var ticket = new FormsAuthenticationTicket(2,Session["username"].ToString(),DateTime.Now,DateTime.Now.AddMinutes(FormsAuthentication.Timeout.TotalMinutes), true,"",FormsAuthentication.FormsCookiePath);
               var encryptedTicket = FormsAuthentication.Encrypt(ticket);
               var cookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket)
               {
                   HttpOnly = FormsAuthentication.RequireSSL,
                   Path = FormsAuthentication.FormsCookiePath,
                   Domain = FormsAuthentication.CookieDomain
               };
               Response.Cookies.Add(cookie);
               Response.Redirect("HomePage.aspx");  
           }

 &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="LoginPage.aspx"
           protection="All"
           timeout="60"
           name=".ASPXAUTH"
           path="/"
           requireSSL="false"
           slidingExpiration="true"
           defaultUrl="HomePage.aspx"
           cookieless="UseDeviceProfile"
           enableCrossAppRedirects="false"/&gt;
      &lt;/authentication&gt;
</code></pre>

<p>My page times out when its left idle for more than 10 mins. I wonder what is going wrong?</p>
