title: asp.net cookies, authentication and session timeouts
body: <p>I have an asp.net website that uses forms authentication. There are a few things I keep in sessions like username, userID, email, etc.</p>
  
  <p>I allow the user to stay logged into the website by setting a long expiration date on the authentication cookie. So it's very common for the session to expire while the user is still authenticated.</p>
  
  <p>The problem I am running into is that sometimes the user's session times out but they're still authenticated. So for example, one of my user pages (which requires authentication) will say "Welcome Mike" when their session is active but once it expires it will say "Welcome [blank]" because the info is no longer in the session, yet they are still authenticated.</p>
  
  <p>What's the best way to handle this? Should I resync the session info when the info is no longer there? Or should I move the user info (username, userID, email) into cookies and not worry about session timeouts?</p>
  
  <p>I do not want to set the session length to something like 60 minutes or more. <strong>What i want is for my users to be able to login once and not worry about having to login again until they explicitly logout.</strong></p>