title: confused on sessions and authentication
body: <p>I am using Session to store a few values and it works fine. When these values are null I need to handle this. Usually they values are set at the login page when they first visit the site.</p>
  
  <p>1.. Do I need to check the authentication to see if session has expired?</p>
  
  <p>What confused me was this post: <a href="https://stackoverflow.com/questions/10480110/how-to-check-whether-session-is-expired-or-not-in-asp-net">How to Check whether Session is Expired or not in asp.net</a></p>
  
  <p>The replies are using Session and IsAuthenticated for the same purposes. </p>
  
  <p>2.. Does Authentication use Session or are they one in the same? </p>
  
  <p>3.. Does the SessionId expire or change for that browser window?</p>
  
  <p>I did notice that the SessionId is created when they open a browser page, at least I am assuming this. So, please correct me if I am wrong. </p>
  
  <p>4.. Do I check to see if they are authenticated for means of checking to see if my Session variables are still valid?</p>
  
  <p>This is what I came up with for each controller method that I want to check to see if the Session variable is valid AND if they are authenticated:</p>
  
  <pre><code>  if (!HttpContext.User.Identity.IsAuthenticated)
    {
      Logging.WriteLog("User.Identity.Authenticated returned false");
      return RedirectToAction("Logon", "Account");
      //return View("Logon");
    }
  </code></pre>
  
  <p>5.. Do I have the right idea? </p>
  
  <p>Please clear some of this up for me!</p>