如何防止用户拥有多个并发会话? [英] How do i preventing a user from having multiple concurrent sessions?

查看:254
本文介绍了如何防止用户拥有多个并发会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阻止用户进行多个并发会话?



我尝试过:



我从以下网站得到了一些回答:http://geekswithblogs.net/Frez/archive/2010/05/17/preventing-a-user-from-having-multiple-concurrent-sessions.aspx

但我收到错误无法连接到SQL Server数据库。如何解决这个错误?或者这个问题的解决方案是什么?

Preventing a User From Having Multiple Concurrent Sessions?

What I have tried:

I got somewhat answer from the following website http://geekswithblogs.net/Frez/archive/2010/05/17/preventing-a-user-from-having-multiple-concurrent-sessions.aspx
But i got the error "Unable to connect to SQL Server database". How to fix this error? Or what is the solution for this problem?

推荐答案

首先,如果你从某个地方获得代码,那么最好的地方就是寻求支持 - 不是完全不同的网站。直接与作者交谈,因为他更有可能立即理解他的代码...

而且我不会去另一个网站查看你发现可能做你想做的代码 - 但你可能不得不改变以适应你的确切情况。



这可能就是问题所在:你正在使用完全代码你发现它没有试图弄清楚它做了什么以及它是如何工作的。这很危险:不是互联网上的每个人都是个好人。如果您不知道代码是如何工作的 - 或者更糟糕的是,如果您甚至不看它并试图理解它 - 它可以做任何事情,包括加密您的硬盘驱动器并要求解密密钥......

但首先检查连接字符串。它需要匹配您的确切配置......或者它不知道如何连接到SQL,这是它试图告诉你的......
First off, if you get code from somewhere, the best place to ask for support is there - not a totally different website. Talk to the author directly, as he is more likely to immediately understand his code...
And I'm not going off to a different site to look at code you found that might do what you want - but that you will probably have had to change in order to work with your exact situation.

And that's probably where the problem lies: you're using exactly the code you found without trying to work out what it does and how it works. That's dangerous: not everybody on the internet is a nice guy. If you don't know how code works - or worse if you don't even look at it and try to understand it - it could do anything, including encrypt your HDD and demand money for the decryption key...
But start by checking the connection string. It needs to match your exact configuration...or it doesn't know how to connect to SQL, which is what it is trying to tell you...


这篇关于如何防止用户拥有多个并发会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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