Forms Authentication Woes
Forms Authentication worked great forever...Unitl i upgraded to 1.1 and vs.net 2003
The Code I have in the page load of every protected page is:
If Context.User.Identity.IsAuthenticated Then
If Not (TypeOf context.User Is SitePrincipal) Then
Dim newUser As New SitePrincipal Context.User.Identity.Name)
Context.User = newUser
End If
End If
If Not (TypeOf Context.User Is SitePrincipal) _
OrElse Not CType(Context.User,
Accounts.Business.SitePrincipal).HasPermission( _
CInt(SupervisorPermissions.ViewForms)) Then
Response.Redirect( _
"/ThePhileVB/WebModules/Accounts/Login.aspx? ShowError=true", True)
End If
Well now, when I login to via login.aspx my FormsAuthentication.SetAuthCookie(EmailAddress.Tex t, False) and a cookie is indeed set in my \cookies directory as usual. However as soon as i navigate away from the login.aspx page Context.User.Identity.IsAuthenticated is always false!!
its like the authentication isn't happening!
I cant' figure it out! web.config is the way it always has been :
<authentication mode="Forms" >
<forms
name="ThePhile"
path="/"
loginUrl="/Project/WebModules/Accounts/Login.aspx"
protection="All"
timeout="30">
</forms>
</authentication>
it has to be something with the upgrade to 2003 and 1.1 any help is mondo appretiated!!!
|