Hiya all,
My buddy and I got a bug with the expiration date of a cookie. When we
want to look out the expiration date, the only thing we've got, it's
01/01/0001.
As we know, when we want to create a persitant cookie, we have to put
a expiration date, otherwise, it will be a session cookie. So here our
code :
HttpCookie cookie = new HttpCookie(m_pr opertyID);
cookie.Value = m_property;
if (m_temporaryCoo kie == false)
{
cookie.Expires = DateTime.MaxVal ue;
}
HttpContext.Cur rent.Response.C ookies.Add(cook ie);
And when we want to see the value :
HttpCookie cookie =
HttpContext.Cur rent.Request.Co okies[m_propertyID];
if ( cookie != null)
{
HttpContext.Cur rent.Response.W rite(cookie.Exp ires);
}
With that, we've always got the 01/01/0001. If you have any ideas to
help us, let us know.
Btw, sorry for the english typos :)