ClaimsIdentity ident = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
AuthManager.SignOut();
AuthManager.SignIn(new AuthenticationProperties { IsPersistent = userInfo.rememberMe }, ident);
//I would like to get the value here
Run Code Online (Sandbox Code Playgroud)
所以我尝试使用HttpContext.Request.Cookies["cookieName"].Value但它不起作用。事实上,当我执行 a 时HttpContext.Response.Cookies.Count,它返回 0。