title: Custom Role Authorization by Session
body: <p>I'm building ASP.NET MVC apps, the apps will check user roles again &amp; again to decide which to display which not.</p>
  
  <p>I have tried WebViewPage to create custom htmlhelper.</p>
  
  <pre><code>&lt;p&gt;@Check.isInRole("Admin")&lt;/p&gt;
  </code></pre>
  
  <p>Then using private string to store the user's Role</p>
  
  <pre><code>private string _Roles { get; set; }
  </code></pre>
  
  <p>but then the _Roles are global and share across all users.</p>
  
  <p>Is there a way I can query DB only once when user connect to webapp for first time, then load all user's roles into Session variable ?</p>
  
  <p>Or </p>
  
  <p>Other workaround method also means a lot to me. Please help.</p>
  
  <p>*****I knew we can use ASP NET Membership, do not want to use for some reason.</p>