c# cookies don't persist after refresh
===

I am using c# and mvc. I am trying to write a cookie to the user browser. but after a refresh of the browser the cookie disappear. 
this is my code for writing the cookie:

     movieCookie = new HttpCookie(cookieName);
                movieCookie.Value = "test;
                movieCookie.Expires = DateTime.Now.AddYears(2);
                //add the cookie 
                HttpContext.Current.Response.Cookies.Add(movieCookie);
                
and the one for reading the cookie:
       

 

    //check if such cookie exist
            HttpCookie movieCookie = null;
            if (HttpContext.Current.Request.Cookies.AllKeys.Contains(cookieName))
                movieCookie = HttpContext.Current.Request.Cookies[cookieName];