Re: Can't Write Cookie IE
- From: "Curt_C [MVP]" <software_at_darkfalz.com>
- Date: Tue, 05 Jul 2005 11:15:06 -0500
Are you sure the clients have their browser set to allow cookies? Some dont.
-- Curt Christianson site: http://www.darkfalz.com blog: http://blog.darkfalz.com
GarrettD78 wrote:
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
.
- Follow-Ups:
- Re: Can't Write Cookie IE
- From: GarrettD78
- Re: Can't Write Cookie IE
- References:
- Can't Write Cookie IE
- From: GarrettD78
- Can't Write Cookie IE
- Prev by Date: Re: Cannot get a handle on web UserControls in ASP 2.0
- Next by Date: ModalWindow not firing Page_Load.. please help
- Previous by thread: Can't Write Cookie IE
- Next by thread: Re: Can't Write Cookie IE
- Index(es):
Relevant Pages
|