G
Guest
I am having trouble with my authentication cookie with IE. I create and write
the cookie here but some of the client PC never get the cookie. This does
work with other browsers like Firefox.
If Request.Cookies("portalroles") Is Nothing Then
Dim _user As New UsersDB
Dim roleStr As String = ""
Dim role As String
roleStr = _user.GetRoles(User.Identity.Name)
'For Each role In roles
'roleStr += role
'roleStr += ";"
'Next
Dim ticket As New FormsAuthenticationTicket(1, _
Context.User.Identity.Name, _
DateTime.Now, _
DateTime.Now.AddHours(1), _
False, _
roleStr)
Dim cookieStr As String = FormsAuthentication.Encrypt(ticket)
'Send Cookie to client
Response.Cookies("portalroles").Value = cookieStr
Response.Cookies("portalroles").Path = "/"
Response.Cookies("portalroles").Expires =
DateTime.Now.AddMinutes(5)
Worst part is this works on most of my clients but not on other.s
Thanks
the cookie here but some of the client PC never get the cookie. This does
work with other browsers like Firefox.
If Request.Cookies("portalroles") Is Nothing Then
Dim _user As New UsersDB
Dim roleStr As String = ""
Dim role As String
roleStr = _user.GetRoles(User.Identity.Name)
'For Each role In roles
'roleStr += role
'roleStr += ";"
'Next
Dim ticket As New FormsAuthenticationTicket(1, _
Context.User.Identity.Name, _
DateTime.Now, _
DateTime.Now.AddHours(1), _
False, _
roleStr)
Dim cookieStr As String = FormsAuthentication.Encrypt(ticket)
'Send Cookie to client
Response.Cookies("portalroles").Value = cookieStr
Response.Cookies("portalroles").Path = "/"
Response.Cookies("portalroles").Expires =
DateTime.Now.AddMinutes(5)
Worst part is this works on most of my clients but not on other.s
Thanks