title: .NET MVC - Where to check IsInRole() in Global.asax?
body: <p>In which part of the Global.asax lifecycle can I safely 'use' the <code>User</code> object? I'm using the default <code>forms authentication</code> and noticed the following:</p>
  
  <pre><code>Sub Application_BeginRequest()
      'Context.User Is Nothing
  End Sub
  
  Sub Application_AuthenticateRequest()
      'Context.User Is Nothing
  End Sub
  
  Sub Application_AuthorizeRequest()
      'Context.User is available
      'Context.User.IsInRole() returns false while user is in role
  End Sub
  </code></pre>
  
  <p>Seems like <code>AuthorizeRequest()</code> should be the place, however <code>IsInRole()</code> doesn't return the expected <code>true</code>. <strong>Am I missing something here?</strong></p>