title: ASP.Net MVC 3: Where to handle session loss?
body: <p>I've started bumping into errors when my session has been lost, or upon rebuilding my project, as my forms authentication cookie still lives on.</p>
  
  <p>In WebForms I'd use the masterpage associated with pages which require login to simply check for the session.</p>
  
  <p>How would I do this in one location in MVC ? I'd hate having to check for session state in every action in my controllers.</p>
  
  <p>On the other hand I can't just apply a global filter either, since not all Controllers require session state.</p>
  
  <p>Would it perhaps be possible in my layout view ? It's the only thing the pages which require session have in common.</p>