title: How do I get servicestack session available on all my views?
body: <p>I'm currently building an mvc3 w/ servicestack web app. I'm using servicestack credentials authentification and using servicestack sessions.</p>
  
  <p>I'm already aware that I can access the session in the view by retrieving and setting it in the ViewBag this way:</p>
  
  <pre><code>public partial class HomeController : ControllerBase {
      public virtual ActionResult Index() {
          ViewBag.UserSession = base.UserSession;
          return View();
      }   
  }
  </code></pre>
  
  <p>I really don't want to repeat this piece of code in each of my methods and I'am looking for a generic way of accessing the session in my views, any ideas?</p>