G
Guest
While I was learning about baking cookies in ASP.NET, I also ran across this
interesting article that outlined a few bombs to watch out for when using
cookies in ASP.NET:
http://www.codeproject.com/aspnet/aspnetcookies.asp
The "disappearing cookie" syndrome that the author describes seems
problematic:
<quote> If you try to access a cookie that doesn't exist in the
Response.Cookies collection, it will be created with an empty string in the
Value and an Expires date of 01-Jan-0001 00:00. Strangely, it also creates a
matching cookie in the Request.Cookies collection if one doesn't already
exist. </quote>
The author goes on to describe how this can bite you if you're doing
conditional tests for the existence of a cookie.
Will this behavior change in ASP.NET 2.0?
interesting article that outlined a few bombs to watch out for when using
cookies in ASP.NET:
http://www.codeproject.com/aspnet/aspnetcookies.asp
The "disappearing cookie" syndrome that the author describes seems
problematic:
<quote> If you try to access a cookie that doesn't exist in the
Response.Cookies collection, it will be created with an empty string in the
Value and an Expires date of 01-Jan-0001 00:00. Strangely, it also creates a
matching cookie in the Request.Cookies collection if one doesn't already
exist. </quote>
The author goes on to describe how this can bite you if you're doing
conditional tests for the existence of a cookie.
Will this behavior change in ASP.NET 2.0?