Click here to Skip to main content
16,019,983 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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?
Posted
Comments
F-ES Sitecore 12-Feb-16 3:48am    
Do you have forms ASP.NET Membership working first? It could be an issue connecting to your membership database, the article assumes you already have Membership configured and working.

Personally I just wouldn't bother though, see point 5 here, I don't understand this obsession with trying to stop multiple logins.

1 solution

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...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900