authentication ticket expiring too soon



Hi,

I am trying set up my site so that once a user logs in, they stay
logged in for 72 hours unless they close their browser.

I have the following in place:

(web.config)
-----------------
<system.web>
<sessionState timeout="4320" />
<httpRuntime maxRequestLength="102400" executionTimeout="180" />
<authentication mode="Forms">
<forms loginUrl="signin.aspx" name="UserID" timeout="4320"
slidingExpiration="true" path="/">
</forms>
</authentication>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>

(signin.aspx)
-------------------
FormsAuthentication.RedirectFromLoginPage(myUserID, false);


I also have a test page that tells me some cookie/ticket info:

(test.aspx)
-------------------
StringBuilder sb = new StringBuilder();
HttpCookieCollection cookies = Request.Cookies;
for (int i = 0; i < cookies.Count; i++)
{
sb.Append("Name: " + cookies[i].Name + "<br/>");
sb.Append("Value: " + cookies[i].Value + "<br/>");
sb.Append("Domain: " + cookies[i].Domain + "<br/>");
sb.Append("Path: " + cookies[i].Path + "<br/>");
sb.Append("HasKeys: " + cookies[i].HasKeys + "<br/>");
sb.Append("Expires: " + cookies[i].Expires.ToString() +
"<br/><br/>");
}
FormsIdentity id = (FormsIdentity)User.Identity;
FormsAuthenticationTicket ticket = id.Ticket;
sb.Append("Ticket Name: " + ticket.Name.ToString() + "<br/><br/>");
sb.Append("Ticket Path: " + ticket.CookiePath.ToString() +
"<br/><br/>");
sb.Append("Ticket Issue Date: " + ticket.IssueDate.ToString() +
"<br/><br/>");
sb.Append("Ticket Expires: " + ticket.Expiration.ToString() +
"<br/><br/>");
sb.Append("Ticket Expired: " + ticket.Expired.ToString() +
"<br/><br/>");
sb.Append("Ticket Is Persistent: " + ticket.IsPersistent.ToString() +
"<br/><br/>");
Response.Write(sb.ToString());

I am able to login okay, and it appears the expiration date seem to be
in effect, as the results of the above test page are:
----------------------------------------
Name: UserID
Value:
E3099CA828B03D405118E120E7F47A2E0C9F3BAC50961AB996E2E681BFA6CB282D1BE0E214F69E035CF635D867A9D02DE0AF2F70EC40389505E53C71B2E28A0E
Domain:
Path: /
HasKeys: False
Expires: 1/1/0001 12:00:00 AM

Name: ASP.NET_SessionId
Value: yyvr3w55ryhmmyugovdllxex
Domain:
Path: /
HasKeys: False
Expires: 1/1/0001 12:00:00 AM

Ticket Name: 1
Ticket Path: /
Ticket Issue Date: 9/27/2006 5:35:27 PM
Ticket Expires: 9/30/2006 5:35:27 PM
Ticket Expired: False
Ticket Is Persistent: False

As you can see, the ticket is set to expire in 72 hours. However, after
about 20-30 minutes of inactivity, my ticket appears to expire -- I am
redirected to the login page, and the test page throws an error because
User.Identity is null.

What am I missing? :(

Thanks in advance,
Alyssa

.



Relevant Pages

  • Re: Passport expires Dec 2006....
    ... Your I-94 will likely expire at the same time as the passports. ... that time (if you plan to leave the country by that time, ... The round trip ticket requirement only applies to people using the visa ...
    (misc.immigration.usa)
  • Re: Validating Users With Expired Passwords
    ... You haven't said what Kerberos server you're using, ... the username, old password, and new password, and then attempt a password ... ticket, but getting a ticket for a service whose secret key you know, so ... the password expire in the first place. ...
    (comp.protocols.kerberos)
  • Re: newbie question on forms auth with custom data
    ... and so it must expire when the ticket does - so I was ... custom data in theauthticket and am very confused about how to do so. ... course the session and tickets don't expire at the same time...argh. ... and the prinicpal and encrypt/decrypting cookies and my head starts to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Looking for details on how machine password aging works.
    ... Machine account passwords do not expire as user account passwords do. ... e.g. applying group policies requires a ticket. ... his ticket will contain wrong information about that member server. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Passport expires Dec 2006....
    ... I am abit concerned cos my 3 kids passports expire 21 December (they ... Also, we don't have a return ticket per se, for our outward journey we ... return ticket will we be ok upon arrival at immigration in the US? ...
    (misc.immigration.usa)