title: HttpModule and Page creation?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/441421/httpmodule-event-execution-order">HTTPModule Event Execution Order?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm investigating where does the Page object is initially created  in the HttpModule Pipeline : </p>
  
  <pre><code> HttpModule 
  
       ===========
      #1  BeginRequest
      #2  AuthenticateRequest
      #3  AuthorizeRequest
      #4  RespolveRequestCache
      #5  AcquireRequestState 
      #6  PreRequestHandnlerExecute
  
      Handler
      ========
      #7  ProcessRequest
  
     ... later stages
     ================
  </code></pre>
  
  <p>and here is my expirament : </p>
  
  <p>I've register each function to execute a specific method  : </p>
  
  <pre><code>  void check(object sender, EventArgs e)
          {
            Page objPage = (sender as HttpApplication).Context.Handler as Page;
            if (objPage == null) return;
            ...
          }
  </code></pre>
  
  <p>the <em>first</em> stage where the "safe cast" worked successfully  was the <code>AcquireRequestState</code> .</p>
  
  <p>Question : </p>
  
  <p>It did worked for <em>me</em>  , but is it a safe place to acquire the page class ? </p>
  
  <p>Also , why isn't it documented anywhere ? I've searched in Msdn in what stage the page class is first accessible , and couldn't find any.</p>