I am creating a model,serializing & assigning into cookie and passing it to next Page. I am able to get cookie values in next page in all browser except
- MAC -Yoshemite - Safari
IOS - IPHONE 6 Mobile- Safari
Do I need to update the below code to work in Safari.
string CookieName= "dsResponse"; string json = new JavaScriptSerializer().Serialize(model); if (HttpContext.Current.Request.Cookies[CookieName] != null) { HttpContext.Current.Response.Cookies[CookieName].Expires = DateTime.Now.AddDays(-1); } HttpContext.Current.Response.SetCookie(new HttpCookie(CookieName) { Value = json, HttpOnly = false, Expires = DateTime.Now.AddSeconds(Convert.ToInt32(ConfigurationManager.AppSettings["cookiesecond"])) });