473,395 Members | 1,624 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,395 software developers and data experts.

avoid multiple simultaneous login using asp

AnuSumesh
Hi All,

I want to avoid multiple simultaneous login to the site.
The way it should work is If a person has logged in to the site from one machine and he is logging in to the portal from the other machine without logging off the previous session, it should disconnect the previous session and open the new session (similar to yahoo messenger.)

I am able to find out the session details of first session (session id etc.) but i dont know how to log off from previous session?

Can Anyone help me?

Thanks a Lot.

Regards,
Anu
Jan 4 '08 #1
4 2399
Nicodemas
164 Expert 100+
Oof, I tried doing this once strictly with session GUIDs, but I gave up. What I ended up with is this:

What I think has to happen is, you store the user's session GUID in your user database table each time he/she logs in.

Each time your system checks if a user is logged in, your script compares the GUID to the one in the database. If they do not match, user's session is terminated, which effectively logs him out.
Jan 6 '08 #2
Hi Nicodemas,

First of all Thanks for reply.

Actually i am using XML file.
And currently what i m doing is : if user is logged in one machine and he is trying to log in second machine then he is not allowed to log in on 2nd machine.
But i want that he should be logged off from first machine 'n' should be logged in 2nd machine.
But in ASP, i did not find any way to kill another session.

Regards,
Anu Garg
Jan 7 '08 #3
Nicodemas
164 Expert 100+
The same concept still applies.

When a user logs in, a new, unique value is stored in your XML file (like a GUID) and in a session variable.

Each page that checks if the user is logged in compares the session variable to the new, unique value. If it does not match, then the script checking if the user is logged in should fail, clear out any session variables, and redirect the user to the login page.
Jan 9 '08 #4
The same concept still applies.

When a user logs in, a new, unique value is stored in your XML file (like a GUID) and in a session variable.

Each page that checks if the user is logged in compares the session variable to the new, unique value. If it does not match, then the script checking if the user is logged in should fail, clear out any session variables, and redirect the user to the login page.
Hi,

Thanks for reply.
I have done it. I m using following code when new Session Id does not match with old Session Id:

set xmlhttp = server.Createobject("WinHttp.WinHttpRequest.5.1")
xmlhttp.Open "GET",url
xmlhttp.Option(4) = 13056
xmlhttp.setRequestHeader "Cookie", cookie
xmlhttp.send

where url ------- is url of page for my log off page
cookie ---- is session id of first session that i want to log off

It is working fine.

Regards,
Anu Garg
Jan 10 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

19
by: Claudio Grondi | last post by:
I would like to save time copying the same file (>6 GByte) to various different target storage media connected to the system via USB. Is there a (Python or other) tool able to help me to do...
11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
6
by: Quiet Man | last post by:
Hi all, I'm designing a fairly simple service that will run on W2K/SP4 and W2K3 servers. It's job is to be a very specialized database server that listens on a given IP address / TCP port and...
13
by: Hope Paka | last post by:
I am storing user login information (not password) in the session. I also use, cookieless session. I realized that, if someone copy-pastes the URL after he/she logged in to the system to another...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
3
by: Tony | last post by:
I've done a fair bit of searching on this, but I want to be certain about what I've found - so here goes with a long example and three questions: For clarity, let me give an example (a number of...
12
by: johnny | last post by:
I have taken a look at the code that dose one download at time, in multi threaded manner: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/465531 What I wanted to do is, make it download...
17
by: Arjen | last post by:
Hi, I want to reload 2 divs at one click. Ive tried: <a href = "javascript:void(0);"...
4
by: raylopez99 | last post by:
Compound question: first, and this is not easy, if there's a way to detect multiple simultaneous key presses in C# let me know (in the below code, keys c and d being pressed simultaneously or...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.