小编noo*_*oob的帖子

如何在调用 IauthenticationManager.SignIn 后立即获取 OWIN cookie 的值?

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。

c# cookies asp.net-mvc owin asp.net-identity

6
推荐指数
1
解决办法
1679
查看次数

标签 统计

asp.net-identity ×1

asp.net-mvc ×1

c# ×1

cookies ×1

owin ×1