473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Preventing concurrent logins - Classic ASP

Description:
I would like to prevent a user from logging in with their user/password
combination on a different computer or even a different browser window, if
they are already logged in. I have a login page, from which I use a DB check
to verify user/password info. Also, I have a bit loggedIN field in the DB,
which I use to see if they are currently logged in; if so, I prevent them
from logging in a second time.

Problem:
Unless they click the "Log Out" button, then the DB value does not get
changed. Any suggestions as to how I can log them out, even if they simply
close the browser window or jump to a different page?

Thanks in advance!
Jul 22 '05 #1
2 4720
1. Put a timestamp in the database and update it with every page hit. Then
you can have the login "time out"

2. At login time, give the user the option to cancel the pre-existing
session if one exists. You'll need to keep a unique "logged on" identifier
instead of a simple flag to block the previous session if an attempt is made
to re-use it.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"BenM" <RE***********@ulgt.orgREMOVECAPS> wrote in message
news:68**********************************@microsof t.com...
Description:
I would like to prevent a user from logging in with their user/password
combination on a different computer or even a different browser window, if
they are already logged in. I have a login page, from which I use a DB check to verify user/password info. Also, I have a bit loggedIN field in the DB, which I use to see if they are currently logged in; if so, I prevent them
from logging in a second time.

Problem:
Unless they click the "Log Out" button, then the DB value does not get
changed. Any suggestions as to how I can log them out, even if they simply close the browser window or jump to a different page?

Thanks in advance!

Jul 22 '05 #2

BenM wrote:
Description:
I would like to prevent a user from logging in with their user/password combination on a different computer or even a different browser window, if they are already logged in. I have a login page, from which I use a DB check to verify user/password info. Also, I have a bit loggedIN field in the DB, which I use to see if they are currently logged in; if so, I prevent them from logging in a second time.

Problem:
Unless they click the "Log Out" button, then the DB value does not get changed. Any suggestions as to how I can log them out, even if they simply close the browser window or jump to a different page?


Here's what I do: I have a table that contains the user ID,
application ID (which is just an identifier to the different apps we
have) an session ID.

Then the user logs in, those fields are populated. Every time a page
loads we have a toolbar that is included on each page. That page then
checks the current session ID against the database. IF it doesn't
match, I send them to a page which says "You can only be logged into
the application in one browser at a time"... or something like that.

So what ends up happening is that whatever browser session logs in
last, that's the valid session. That way someone could leave their
desk, go to another workstation, and still be able to log into their
account.

Jul 22 '05 #3

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

Similar topics

0
by: Dave Pylatuk | last post by:
Hello all. I am wondering if there is an easy way to prevent users from connecting to the same database more than once at a time. Ie. I do not want 'joe' users sharing logins. Thanks in...
1
by: Karthik | last post by:
Hi, I have a website running on ASP.Net on IIS 6.0. This website has more than 10000 users login everyday. At times the users login with the same user name and password more than once at the...
3
by: mgPA | last post by:
Short: How can I limit the number of concurrent logins to Access (2000) DB? Long: I seem to be having the problem discussed in previous postings of having more than 9 or 10 concurrent logins. ...
1
by: Sameer | 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...
8
by: pnp | last post by:
Hi all, I've developed a win C# app that is actually database driven using SQL server 2000. The idea is that only one application will be installed on a server in a network and the program will be...
2
by: Calvin KD | last post by:
Hi everyone, Can someone suggest a way of monitoring the number of logins for each user in a particular session to make sure that a particular user cannot log in twice in the same session? I have...
10
by: bregent | last post by:
I've seen plenty of articles and utilities for preventing form injections for ASP.NET, but not too much for classic ASP. Are there any good input validation scripts that you use to avoid form...
4
by: Paul | last post by:
I have an ASP.NET application that I want to limit # of concurrent logins. Has anyone done similar things before? I was trying to increment a counter in the application and decrement the counter in...
6
by: javelin | last post by:
In ASP classic pages, I want to know if it's possible to prevent session variables from becoming zero length strings? I have tried setting the Session.Timeout to a large value, but alwas, after 20...
6
by: krvrk | last post by:
Hi, I am creating a report for which i need to query a table for total number of users and Concurrent users logged in. The table will contain Username(nvarcar,not null),SessionStart...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.