title: Browsers do not set cookie
body: <p>I developed an ASP.NET MVC website, using the nopCommerce platform. Everything works ok on the production server, but I recently encountered a problem regarding cookies, on the development server. The browser receives the cookie, but it does not set it. I can see the Set-Cookie statement in the headers or the actual cookie in the cookies tab, using browser developer tools. Why does the browser not set this cookie? </p>
  
  <pre><code>Set-Cookie:Pentrugatit.client=78deb2e0-59fb-4193-a53e-da35377ece8b; expires=Fri, 19-Jun-2015 19:33:10 GMT; path=/; HttpOnly
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/xo5Z9.png" alt="the received cookie"></p>
  
  <p><img src="https://i.stack.imgur.com/iUujg.png" alt="the Pentrugatit.client cookie is not set"></p>
  
  <p>You can access the website <a href="http://cerebro.go.ro/kitchen2.0" rel="nofollow noreferrer">here</a>, as long as my development server is turned on.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I also tested from another computer in the network. Same thing happening. The cookies are not set, altough they are received in the response headers.</p>
  
  <p><strong>Update 2:</strong></p>
  
  <p>It has something to do with the expires date. If I remove the expires property of the cookie, then it is succesfully set as a session cookie. But I do not understand what the problem is. My system date is set correctly, and the cookie expires date is also set correctly, according to the <a href="http://en.wikipedia.org/wiki/HTTP_cookie#Expires_and_Max-Age" rel="nofollow noreferrer">specifications</a>.</p>
  
  <p>Any ideas what the problem might be?</p>