C# asp.net: Cookie Expiration date in Chrome -
i'm having issue expiration date of cookie in c# when in chrome.
here code i'm using:
public static void createcookie(users u, datetime expirationdate) { httpcookie logincookie = new httpcookie("cookie"); logincookie.value = "somevalue"; logincookie.expires = datetime.utcnow.adddays(1d); httpcontext.current.response.cookies.add(logincookie); } i've run code through fiddler , return correct expiration date. cookie's expiration date correct in firefox , ie9 however, when run in chrome expiration date set to: sun, 07 dec 1969 03:28:36 gmt
always @ 3:28:36 gmt never changes. idea on why happening appreciated. thanks!
i've tried set expiration date using: datetime.now.adddays(1d) same result.
it's bug in current version of chrome, it's displaying of expiration date wrong, not actual expiration, value have set honored chrome!
here's link bug has been fixed in nightly builds (verified fixed 20.0.1132.7 (official build 136817)) : http://code.google.com/p/chromium/issues/detail?id=125546
Comments
Post a Comment