wilcor14
asked on
User.Identity.IsAuthenticated problem in global. asax
In the code snippet below, I am trying to see if the user is logged in and has verified their email using the role manager of .net. As the application loads, the User.Identity.IsAuthentica ted produces a
Object reference not set to an instance of an object error
Can anyone help me find a work around. Thanks.
Object reference not set to an instance of an object error
Can anyone help me find a work around. Thanks.
Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
If User.Identity.IsAuthenticated <> Nothing Then
If User.IsInRole("UnvalidatedEmail") Then
Response.Redirect("VerifyCode")
End If
End If
end sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://support.microsoft.com/kb/810098