我有一个SL 4应用程序,带有用于身份验证的RIA服务(Forms + IE9)。请考虑以下方案
System.Web.HttpContext.Current.User
内部是用户B的隐藏凭据,这是一种灾难这是我的web.config的一部分
<authentication mode="Forms" >
<forms name="MY_COOKIE_NAME" timeout="180"/>
</authentication>
和负责登录的代码部分
public AuthenticationUser Login(string userName, string password, bool isPersistent, string customData)
{
var retUser = new DefaultUser();
if (/*check credentials*/)
{
FormsAuthentication.SetAuthCookie(userName, true);
retUser = CreateAuthenticatedUserData(userName);
}
return retUser;
}
答案 0 :(得分:0)
似乎问题在于互联网浏览器 - 永远不要在同一浏览器的两个选项卡中打开应用程序的两个实例 - 会话/ cookie /共享的任何内容