title: If User.Identity.IsAuthenticated Then... Object reference not set to an instance of an object
body: <p>Ok so this problem is baffling me.  I have a custom class that all my pages inherit from</p>
  
  <pre><code>Public Class Page : Inherits Page
      Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
          'Display Admin Controls (Buttons) '
          If User.Identity.IsAuthenticated Then
             'do some stuff '
          End If
      End Sub
  End Class
  </code></pre>
  
  <p>But for some reason I'm getting this error:</p>
  
  <blockquote>
    <p>System.NullReferenceException: Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <p>on this line</p>
  
  <pre><code>If User.Identity.IsAuthenticated Then
  </code></pre>
  
  <p>This only started happening in IIS7. I have been using this application in IIS6 for over a year without issue, and it's only since I migrated to IIS7 yesterday that this exception started.</p>