Another newb with some quick Error
Try
Dim authTicket As FormsAuthenticationTicket = _
FormsAuthentication.Decrypt(authCookie.Value)
Dim roles = authTicket.UserData
Dim userIdentity As GenericIdentity = _
New GenericIdentity(authTicket.Name)
Dim userPrincipal As GenericPrincipal = _
New GenericPrincipal(userIdentity, roles)
Context.User = userPrincipal
Catch ex As Exception
End Try
Error 1 Value of type 'String' cannot be converted to '1-dimensional array of String'. C:\xxx
Re: Another newb with some quick Error
Re: Another newb with some quick Error
Re: Another newb with some quick Error
Erm.... VB.NET :confused:
Re: Another newb with some quick Error
sometimes it's good to follow the examples from the msdn ;)
http://msdn.microsoft.com/en-us/libr...principal.aspx
Code:
Dim roles(1) As String
roles(0) = authTicket.UserData
Dim userPrincipal As GenericPrincipal = New GenericPrincipal(userIdentity, roles)