You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
When signing out of our web application we're wanting to clear a cookie that's set during their use of the application. The weird thing is that
Response.Cookies.Delete("searchCriteria");
doesn't clear the cookie, but
Response.Cookies.Delete("searchCriteria", new CookieOptions() { Expires = DateTime.Now.AddDays(-1) });
does. If I set a break point right after the call to Delete(), in both cases it looks like the expiration of the cookie is set to something significantly old (January 1 1970) - so my passing in Expires = ... doesn't do anything.
I looked at ResponseCookies.cs and can't really reason this out (but it's been a long day and maybe I'm just not seeing the issue). Anyways, I'd have thought we'd want the expiration (set way at the bottom of ResponseCookies.cs to make the cookie go bye bye.
Thanks,
Brian Eriksen
The text was updated successfully, but these errors were encountered:
Hi All,
When signing out of our web application we're wanting to clear a cookie that's set during their use of the application. The weird thing is that
Response.Cookies.Delete("searchCriteria");
doesn't clear the cookie, but
Response.Cookies.Delete("searchCriteria", new CookieOptions() { Expires = DateTime.Now.AddDays(-1) });
does. If I set a break point right after the call to
Delete()
, in both cases it looks like the expiration of the cookie is set to something significantly old (January 1 1970) - so my passing in Expires = ... doesn't do anything.I looked at ResponseCookies.cs and can't really reason this out (but it's been a long day and maybe I'm just not seeing the issue). Anyways, I'd have thought we'd want the expiration (set way at the bottom of ResponseCookies.cs to make the cookie go bye bye.
Thanks,
Brian Eriksen
The text was updated successfully, but these errors were encountered: