Click to See Complete Forum and Search --> : Another newb with some quick Error


bumassjp
December 8th, 2009, 10:57 PM
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

HanneSThEGreaT
December 9th, 2009, 01:15 AM
[ Redirected ]

Ethereal
December 17th, 2009, 07:34 PM
redirected to where?

HanneSThEGreaT
December 18th, 2009, 12:14 AM
Erm.... VB.NET :confused:

memeloo
December 18th, 2009, 12:39 AM
sometimes it's good to follow the examples from the msdn ;)
http://msdn.microsoft.com/en-us/library/system.security.principal.genericprincipal.aspx


Dim roles(1) As String
roles(0) = authTicket.UserData
Dim userPrincipal As GenericPrincipal = New GenericPrincipal(userIdentity, roles)