title: Why does Request.Cookies return null in MVC
body: <p>I'm trying to use <code>Cookie</code> in my asp.net mvc project.<br>
  The Cookie is created and it has value. but I can't read it.<br>
  I created cookie with this code:  </p>
  
  <pre><code>HttpCookie cookie = new HttpCookie("UserSettings", "value");
  cookie.Expires = DateTime.Now.AddDays(10);
  HttpContext.Response.Cookies.Add(cookie);  
  </code></pre>
  
  <p>And this code is for reading:  </p>
  
  <pre><code>return HttpContext.Request.Cookies["UserSettings"].Value;  
  </code></pre>
  
  <p>But in reading cookie I have this error:</p>
  
  <blockquote>
    <p>object reference not set to an instance of an object  </p>
  </blockquote>
  
  <p>I really confused why! I searched a lot and It has wasted my time.<br>
  Where did I make a mistake?  </p>
  
  <p><strong>Update</strong><br>
  I checked Application tab in developer tools chrome. The cookie exists.</p>