asp.net窗体身份验证多人登录下相同的用户名 [英] asp.net Forms Authentication multiple people logged in under same username

查看:124
本文介绍了asp.net窗体身份验证多人登录下相同的用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用窗体身份验证一个MVC3的网站,我想知道,如果有如果有几个或更多的人在使用相同的用户帐户登录,可能会出现的任何问题?

I have a MVC3 website that uses forms authentication, and I wanted to know if there are any issues that may arise if several or more people are logged in using the same user account?

我一直在试图麻烦拍摄,我们一直有一个错误(它看起来像服务器具有数据库服务器,通信问题的网站),但是我只是想排除从账号的共享所带来的问题的可能性

I have been trying to trouble shoot an error we've been having (it looks like the website server is having issues communicating to the database server,) however I just wanted to rule out the possibility of the issue arising from account sharing.

感谢

推荐答案

没有,至于ASP.NET窗体身份验证机制而言(我真的很讲窗体身份验证,而不是ASP.NET会话这是2完全不同的东西),绝对不存在的问题。用户跟踪与饼干和请求是无状态的。数据库还可以处理并发pretty好。

No, as far as ASP.NET Forms Authentication mechanism is concerned (and I am really talking about Forms Authentication, not ASP.NET Sessions which are 2 completely different things), there are absolutely no issues. Users are tracked with cookies and requests are stateless. Databases also handle concurrency pretty well.

当然,开发者可以编写code,根本不会在有多个用户使用同一个账户相连,因为他们做错事的这种情况下工作。例如开发人员开始使用ASP.NET会话规避HTTP协议的无状态特性。这就是问题可能开始出现。例如,因为ASP.NET会话不是线程安全的,ASP.NET自动串行访问它们,这意味着你不能在同一个会话的并发请求=>它们进行排队,按顺序执行。

Of course developers could write code that simply doesn't work in this scenario of having multiple users connected with the same account because they did something wrong. For example developers start using ASP.NET Sessions to circumvent the stateless nature of the HTTP protocol. That's where problems might start to arise. For example since ASP.NET Sessions are not thread safe, ASP.NET automatically serializes access to them, meaning that you cannot have concurrent requests from the same session => they are queued and executed sequentially.

这篇关于asp.net窗体身份验证多人登录下相同的用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆