【发布时间】:2014-12-01 18:04:30
【问题描述】:
如何在 asp.net mvc 5 和 Identity 中为每个选项卡使用不同的帐户登录?
有没有不使用cookies的配置?
这是我的配置代码:
' Enable the application to use a cookie to store information for the signed in user
app.UseCookieAuthentication(New CookieAuthenticationOptions() With {.AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, .LoginPath = New PathString("/Account/Login") _
})
' Use a cookie to temporarily store information about a user logging in with a third party login provider
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie)
【问题讨论】:
-
我想你忘了记住网络本质上是无状态的,并且不知道标签。为什么还要为每个选项卡单独设置一个会话?
-
好吧。我需要类似于 gmail“使用另一个帐户登录”的功能。有可能实现类似的东西吗?
-
当然可以。显然,Gmail 已经做到了。但这不是创建另一个会话。
-
Google 的多重登录实际上是 links 帐户。它不会创建不同的会话或任何东西。它只是在现有身份验证中添加另一个帐户,并在内部设置一些关于您目前实际使用的链接帐户的标志。
标签: asp.net .net asp.net-mvc vb.net asp.net-identity