473,657 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

preventing multiple logins

one important problem i am facing is that my web solution
(asp.net) will be deployed on a webfarm. I am using sql
server session management on clustered sqlservers. but as
i need to prevent multiple logins through a
username/password (same credentials at a time) on the
website.

also session_end() event does not fire in sql server mode.

one solution is sychronized cache of webservers. and
maintaining usernames (loggedin) in the application cache.
This solution does not look like a robust solution.
suggest a standard solution.
please help me.

Regards
Sameer

Nov 15 '05 #1
1 2508
A crude method would be to give the user a LastPageAccess property and a
LockedSession boolean property. When a user logs in, you set LastLoggedIn to
GetDate() (assuming SQL Server) and LockedSession to true. When a user logs
out, you set LockedSession to false.

When a user hits another page, update LastPageAccess.

The login rules are then:

LastPageAccess > Timeout
When LockedSession = true

If a user tries to open another session, they are refused. Crude but
effective. It will also teach users to use the log out button rather than
just let sessions timeout.

If you do not want as many hits to the database, you can store user infos in
an Application DataSet or cache of objects. I am not sure of the scalability
of that idea, however.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** *************** **********
Think Outside the Box!
*************** *************** *************** *************** **********
"Sameer" <sa**********@j v.cmc.net.in> wrote in message
news:06******** *************** *****@phx.gbl.. .
one important problem i am facing is that my web solution
(asp.net) will be deployed on a webfarm. I am using sql
server session management on clustered sqlservers. but as
i need to prevent multiple logins through a
username/password (same credentials at a time) on the
website.

also session_end() event does not fire in sql server mode.

one solution is sychronized cache of webservers. and
maintaining usernames (loggedin) in the application cache.
This solution does not look like a robust solution.
suggest a standard solution.
please help me.

Regards
Sameer

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2108
by: Matt | last post by:
I have an interactive web page that I need to prevent refreshes on. The problem is that I want to ALLOW resubmissions, but only via the submit button. My web page has two forms on it, one form for adding users, and one form for removing users. I want to be able to add a user, click the submit button, add another user, click the submit button again, and so on, BUT, disallow adding a user and then hitting refresh (which would add the same...
1
1908
by: The Crow | last post by:
if a user logs in, i want other logged in user with the same credentials to log out. how can i solve this problem?
2
2633
by: sameer.gupta | last post by:
one important problem i am facing is that my web solution (asp.net) will be deployed on a webfarm. I am using sql server session management on clustered sqlservers. but as i need to prevent multiple logins through a username/password (same credentials at a time) on the website. also session_end() event does not fire in sql server mode. one solution is sychronized cache of webservers. and
10
1927
by: Conformix Sales | last post by:
Any thought about how can I stop a user from logging into the application multiple times. I am using forms authentication.
6
4372
by: anoj | last post by:
Hi All i need to prevent multiple logins from the same user at the same time. what is the best way to do this . How can i detect if a user closes the browser window without logging out so tht his/her id can be removed from the global list maintained for the looged in users
2
2887
by: Nicolas Bottarini | last post by:
Hi!! I have a site with a backend subdirectory with the backend of the site. I need that the site to have one login and the backend directory another one. Is this possible with Forms Authentication?? What can i do?? Thanks Nicolas
1
1257
by: The Crow | last post by:
if a user logs in, i want other logged in user with the same credentials to log out. how can i solve this problem?
3
3327
by: Vishal Desai | last post by:
Hi I went thru this article at http://www.eggheadcafe.com/articles/20030418.asp and implemented it in my ASP.Net 2.0 application. You did not say anything about clearing the cache when the user "sign's out" properly from the application, about removing the key the cache. Can you shed some light on that? EggHeadCafe - .NET Developer Portal of Choice http://www.eggheadcafe.com
3
1358
by: cowznofsky | last post by:
We looking at creating a web application where a login Id can only be used once at a time. The idea is that this is a paid site, and we're pricing it by the number of seats. So if we create 3 login Id's, we want to restrict use so that only 3 users are on the app at any time. This strikes me as problematic, but would anybody know of an app where this has been implemented? I'd love to find a kit or open source project where this is...
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7314
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.