Author: janetb | Posted on: 8/5/2010 10:09:29 AM | Views : 254

I'm doing form authentication with roles to access areas of a website. The authentication is working great, but I'm having trouble with the roles piece. On the page in question (needing to narrow the access), the top lblGrps.text (below) shows I'm in the group I need to be in, while the response.write (also immediately below) reads false for the EdIT group:
Try Dim authTicket As FormsAuthenticationTicket = FormsAuthentication.Decrypt(Context.Request.Cookies(FormsAuthentication.FormsCookieName).Value) Dim myGroups As String = (authTicket.UserData).ToString lblGrps.Text = myGroups Catch ex As Exception lblGrps.Text = "empty" End Try Response.Write("User name: " & Context.User.Identity.Name & "<br />Authenticated: " & Context.User.Identity.IsAuthenticated.ToString() & "<br />In EdIT role: &qu ...

Go to the complete details ...