Can't remove cookies!
From: Stephane (Stephane_at_discussions.microsoft.com)
Date: 12/20/04
- Next message: Alejandro Penate-Diaz: "Re: Need help with Datagrid"
- Previous message: Rod: "Forms authentication & AD: logging in seems to take a long time"
- Next in thread: Chris R. Timmons: "Re: Can't remove cookies!"
- Reply: Chris R. Timmons: "Re: Can't remove cookies!"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 20 Dec 2004 13:59:03 -0800
Hi,
I have a login page where if the user wants his access codes to be saved are
set into a cookie. In the logout page, I want to delete those cookies. I
tried this and this is not working at all:
if (Request.Cookies[COOKIE_USER] != null
&& Request.Cookies[admin.COOKIE_PSWD] != null)
{
Response.Cookies[COOKIE_USER].Value = null;
Response.Cookies[COOKIE_PSWD].Value = null;
Response.Cookies.Remove(COOKIE_USER);
Response.Cookies.Remove(COOKIE_PSWD);
}
If I do a response.write like this right after or on another page, it shows
that the cookies are still set:
Response.Write((Request.Cookies[COOKIE_USER] == null) + " " +
Request.Cookies[COOKIE_USER].Value + " ");
Response.Write((Request.Cookies[COOKIE_PSWD] == null) + " " +
Request.Cookies[COOKIE_PSWD].Value);
Why is this not working? How do we remove user's cookie?
Thanks
Stephane
- Next message: Alejandro Penate-Diaz: "Re: Need help with Datagrid"
- Previous message: Rod: "Forms authentication & AD: logging in seems to take a long time"
- Next in thread: Chris R. Timmons: "Re: Can't remove cookies!"
- Reply: Chris R. Timmons: "Re: Can't remove cookies!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|