Posted on: 6/9/2015 3:41:36 PM | Views : 688

I'm Authenticating the user which works fine. But then I want to give that authenticated user a role so they can access a directory on the website.
For some reason the role is not working.
Web.config   in the directory
<configuration> <system.web> <authorization> <allow roles="Administrator"/> <deny users="*"/> </authorization> </system.web> </configuration> Forms Authentication:
Dim createPersistentCookie As Boolean = True Dim tkt As FormsAuthenticationTicket Dim cookiestr As String Dim ck As HttpCookie tkt = New FormsAuthenticationTicket(1, LoginTokenID, DateTime.Now, DateTime.Now.AddMinutes(2000), createPersistentCookie, "") cookiestr = FormsAuthentication.Encrypt(tkt) ck = New HttpCookie(FormsAuthentication. ...

Go to the complete details ...