title: Membership.GetUser() fails when called from an HttpModule
body: <p>I'm calling <code>Membership.GetUser()</code> from inside <code>Application_Error()</code> method in Global.asax file in an ASP.NET application in order to write down some log information.</p>
  
  <p>However, it seems to fail if an error happens inside an HttpModule.  Is it normal?  Isn't Membership ready while executing HttpModules in ASP.NET?  Am I doing something wrong?</p>
  
  <p>It throws an "Object reference not set to an instance of an object." exception (at System.Web.Security.Membership.GetCurrentUserName(), at System.Web.Security.Membership.GetUser()).</p>