Cookies in ASP vnext
问题 How can i use cookies in ASP MVC 6? I want to set and read cookie variables . HttpCookie class can't be resolved . Only the following line works but i couldn't find a way to read the cookie after adding it . Response.Cookies.Append("test", "test"); 回答1: Take a look at how cookies are used in the official MusicStore sample: https://github.com/aspnet/MusicStore/blob/a7ba4f8ffe5ed23b2a2d55e8e1226e64066a7ada/src/MusicStore/Models/ShoppingCart.cs#L152 public string GetCartId(HttpContext context) {