title: AuthenticateRequest event
body: <p><br></p>
  
  <p>Q 1. To my understanding <code>FormsAuthenticationModule</code> is subscribed to <code>AuthenticateRequest</code> event, and thus only after this event is fired, is <code>FormsAuthenticationModule</code> called. But the following quotes got me a bit confused:</p>
  
  <ol>
  <li><blockquote>
    <p>The <code>AuthenticateRequest</code> event signals that the configured authentication mechanism has authenticated the current request.</p>
  </blockquote>
  
  <ul>
  <li>Doesn’t the above quote suggest that when <code>AuthenticateRequest</code> event is raised, request (aka user) is already authenticated?  </li>
  </ul></li>
  <li><blockquote>
    <p>Subscribing to the <code>AuthenticateRequest</code> event ensures that the request will be authenticated before processing the attached module or event handler.</p>
  </blockquote>
  
  <ul>
  <li>As far as I understand this quote, if we subscribe to <code>AuthenticatedRequest</code>, then our event handler will be called prior to <code>FormsAuthenticationModule</code>? Thus <code>Application_AuthenticateRequest()</code> will be called before <code>FormsAuthenticationModule</code> is called?</li>
  </ul></li>
  </ol>
  
  <p><br></p>
  
  <p>Q 2. Book I’m learning from suggests that within <code>Application_AuthenticateRequest()</code> we are able to verify whether user is a member of specific role, and if not, we can add the user automatically:</p>
  
  <pre><code>    protected void Application_AuthenticateRequest(Object sender, EventArgs e)
      {
              if (User.Identity.IsAuthenticated &amp;&amp; Roles.Enabled)
              {
  
                  //here we can subscribe user to a role via Roles.AddUserToRole()
              }       
      }
  </code></pre>
  
  <p>Judging from the above code, <code>Application_AuthenticateRequest()</code> is called after <code>FormsAuthenticationModule</code> has been invoked,  but somewhere else same book implies that <code>Application_AuthenticateRequest()</code> is called prior to <code>FormsAuthenticationModule</code>:</p>
  
  <blockquote>
    <blockquote>
      <p><code>Application_AuthenticateRequest</code>  is called just before authentication is performed.
      This is a jumping-off point for creating your own authentication logic.</p>
    </blockquote>
  </blockquote>
  
  <p><br></p>
  
  <p>What am I missing?</p>
  
  <p><br></p>
  
  <p>Thanx</p>