title: MVC 5 user data available on all pages
body: <p>Basically I need user data to be available on all pages in the site.
  I need to display some user properties in the layout, like:</p>
  
  <blockquote>
    <p>[Username], [FirstName], [LastName], [Email], [IsEmailVerified],
    [Phone], [LastLoginDate], and 4 more properties...</p>
  </blockquote>
  
  <p>But, these aspects need to be considered:</p>
  
  <ol>
  <li>No use of Session (I disabled it in my application).</li>
  <li>No database interaction on each request in order to get those user properties - I want to get them properties once and store them somewhere available.</li>
  <li>I use Forms Authentication.</li>
  </ol>
  
  <p>Now, from a little search I made, I found this article from 2008, posted by Microsoft, about Forms Authentication: <a href="https://docs.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-security/introduction/forms-authentication-configuration-and-advanced-topics-cs#step-4-storing-additional-user-data-in-the-ticket" rel="nofollow noreferrer">Storing Additional User Data in the Ticket</a>, and <a href="https://docs.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-security/introduction/forms-authentication-configuration-and-advanced-topics-cs#step-5-using-a-custom-principal" rel="nofollow noreferrer">Using a Custom Principal</a>.</p>
  
  <p>I think this is the closest approach, because now I use <b>User.Identity.Name</b> to get only the [Username] stored in the authentication ticket, and I love using it because it is quick, available and simple.</p>
  
  <p><b>But</b> I also have a few questions that bother me with this approach:</p>
  
  <ol>
  <li>This was posted in 2008, is it still relevant for 2017? is there something better and new today?</li>
  <li>As you can see above, I have quite a bit user properties that need to go into the auth cookie, and as I read - a lot of user data in the auth cookie is not reccomended...</li>
  </ol>
  
  <p>Thanks for the helpers.</p>