-5

I was testing some codes and write a cookie on my machine (MVC 5, .net 4.7), my test cookie name is "test".

After a while google chrome (Version 63.0.3239.84) did not write my cookie with the name "test" anymore but if I change the cookie name, it works fine as before.

I clear all the cookies but I can not write a cookie with this name: "test".

I clear chrome cookies files at:

C:\Users\Administrator\AppData\Local\Google\Chrome\User Data\Default

But I still have the same problem.

My code:

HttpCookie cookie = new HttpCookie("test", "1");
cookie.Expires = DateTime.Now.AddHours(1);
Response.Cookies.Add(cookie);
Brad Larson
  • 170,088
  • 45
  • 397
  • 571
motevalizadeh
  • 5,244
  • 14
  • 61
  • 108
  • 1
    How do you determine Chrome doesn't write the cookie? – CodeCaster Feb 20 '18 at 13:22
  • Right click on my page> Inspect>Application>Storage>Cookies – motevalizadeh Feb 20 '18 at 13:27
  • 2
    Other users of the site are editing your question: Keep it simple. Don't add noise, or anything that doesn't explain your point. Don't call out other users, just simply **clarify** your question, adding detail. A question will only be closed if it reaches 5 votes. – Blue Feb 20 '18 at 14:04
  • Also: No one can delete comments, except for moderators or if they're flagged by multiple* people. Keep it constructive; stick to explaining why it shouldn't be closed, or ask him for clarification to his comment. – Blue Feb 20 '18 at 14:07

1 Answers1

-1

From chrome v63 the cookies location was changed chrome://settings/siteData remove from here first then try.

  • 2
    so... did it work or not? – D Ie Feb 20 '18 at 13:47
  • 2
    @motevalizadeh the question is _"Why aren't my cookies written"_, not _"Where does Chrome 63 store cookie data"_. This is a debugging hint, not an answer to the question, so it should not be posted as such. See also [How do I write a good answer?](https://stackoverflow.com/help/how-to-answer). And no, I cannot delete other people's comments. – CodeCaster Feb 20 '18 at 13:50