asp.net - Problem setting cookie expiration to DateTime.Max (December 31, 9999)? -


We are supporting a legacy code that is leaving a cookie and establishing date expiration is. MaxValue:

  http cookie cookie = new HTTP cookie (cookie name, value); Cookie.Expires = DateTime.MaxValue;  

It seems that on some browsers (which we are not logging in), this cookie expires immediately - or even if the decline can not be found, according to MSDN, datetime. Maxwell is December 31, 99 99. Are there any browser-related issues with the installation of cookies end date?

The correct answer has to be on the date of expiry, but at this point, we can not change the production code.

If I had to guess randomly why this is not working, I would say that It will technically overflow (32-bit machines) overflow after January 1, 2038 at 3:14:07 AM GMT after this - the next seconds after this is January 1, 1970 0:00:01 AM GMT Will be interpreted as.

It is possible that the future time given by you has actually been changed the last time.

Again, this is a complete estimate and hopefully I can test it soon when VWD Express 2008 downloads

edit:

this Looking for the problem, I got a similar error:


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -