We support legacy code that rejects cookies and sets the expiration dateTime.MaxValue:
HttpCookie cookie = new HttpCookie(cookieName, value); cookie.Expires = DateTime.MaxValue;
It seems that in some browsers (which we do not register) this cookie expires immediately - or even cannot be dropped. According to MSDN, DateTime.MaxValue is December 31, 9999. Are there any problems with the browser setting the cookie expiration date on this date?
The correct answer would be to change the expiration date, but at this point we will not be able to change the production code.
source share