I m using below code to store cookie
if (Request.Cookies["Cookie"] == null)
{
HttpCookie CookieFavourite = new HttpCookie("Cookie1");
CookieFavourite.Value = id;
CookieFavourite.Expires.AddYears(1);
Response.Cookies.Add(Cookie1);
}
else
{
Response.Cookies["CookieFavourite"].Value = Response.Cookies["CookieFavourite"].Value + "," + SomeValue;
}
I specity expiry date equal to 1 year. This cookie value is modified by user almost every day.
But this cookie expire after 12 hrs(approx) although i specity the expiry limit to 1 year.