Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > restrict 1 active session per user

Reply
Thread Tools

restrict 1 active session per user

 
 
Guest
Posts: n/a
 
      02-01-2004
Well, the best way to do this in my opinion would be to
follow the rule of "most recent user is the active
user". This means if I login on one machine, then
another ... the first session is the one that is cut
off. If the first session then logs in again the second
second would then get cutoff. It's a neverending cycle!

You need to:

1. When a user logs in through forms auth, store their
username and ASP session ID in the Application object.
Make it so that it would overwrite a user with the same
name if one already existed. You could do this with
arrays, objects, strings or however but store the
username and session together so that you can look them
up later easily.
1. On each non-logon page, check the the username and
session ID against what is in the Application object. If
it's not there with the same username and sessionid,
SignOut the forms auth and Abandon their session. Then
redirect then to login.

Now, the code part depends on VB.Net, C#, etc. but from
the description above you should have no problem. Anyone
who can code forms auth can certainly do the above. But
if you do need help just email.

>-----Original Message-----
>Hi,
>
>I am using forms authentication. How do I avoid a user

from logging in from multiple computers simultaneously.
>
>When a user logs in, I would like to abandon all other

active sessions of this user.
>
>Thanks,
>John
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Restrict user if user directly types url of any page Jaydeep ASP .Net 3 06-30-2006 04:40 AM
Quick one - Is SESSION per browser instance or per IP Address? =?Utf-8?B?S01aX3N0YXRl?= ASP .Net 7 04-10-2006 03:38 AM
Per packet vs per flow routing R Siffredi Cisco 8 03-24-2005 06:33 PM
Per-to-Per is OK but no ICS Jens Mander Wireless Networking 4 01-23-2005 10:24 PM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM



Advertisments