Cookie not always being set in MVC3

htp

New Member
I have the following code in my MVC3 Controller:\[code\]HttpCookie cookie = new HttpCookie(cookieName);cookie.Values["ID"] = commonSessionId;cookie.Expires = DateTime.MaxValue;Response.Cookies.Add(cookie);return Redirect(Url.Content("~/"));\[/code\]However, the cookie is not always being set. Through my testing, sometimes the cookie will apply, but sometimes this is just ignored.Are there any obvious reasons as to why this is occurring?
 
Back
Top