473,320 Members | 2,041 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,320 software developers and data experts.

How to limit the user only login the system one time at the same t

I want to limit the user only login the system one time at the same time.
I don't want him login the system two with the same user at the same time.

How to do this?
If i have a table to record if this user has logined, this user didn't
logout and just close IE, how do i set his recoed in the table logout?

Thanks,
-Billy
Aug 20 '08 #1
3 3997
Hi Billy,

From your description, I understand you want to prevent users from logining
multiple times(for a specific user account).

As for the login system, are you using Forms Authentication + Membership
service or are you using your own validatiing and authentication service?

Generally, for web application, it use cookie to indicate whether a certain
user has been authenticated(after he has login) in multiple requests to the
same server application(from client). therefore, if one user has login on
one machine and he change to another machine(or system), he may need to
logon again(since the cookie on original system/machine no longer exits).
Are you want to preventing such kind of relogin?

If this is the case, generally, you may need to maintain a table on
server-side(maybe in database or in memory) which mark the status(online or
not) of each user. If a user is marked as online, you will not allow any
more login attemp during that period. Also, such table cannot be 100%
accurate, you need to define an expire span(slide window) that if a user
hasn't visited the server app for that period, you will turn off that
flag(mark it as offline).

the ASP.NET membership use such approach to define the "online users", you
may refer to its implementation if you want to create your own monitoring
system:

#SqlMembershipProvider..::.GetNumberOfUsersOnline Method
http://msdn.microsoft.com/en-us/libr...lmembershippro
vider.getnumberofusersonline.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <ht****@noemail.noemail>
Subject: How to limit the user only login the system one time at the same t
Date: Tue, 19 Aug 2008 21:59:01 -0700
>I want to limit the user only login the system one time at the same time.
I don't want him login the system two with the same user at the same time.

How to do this?
If i have a table to record if this user has logined, this user didn't
logout and just close IE, how do i set his recoed in the table logout?

Thanks,
-Billy
Aug 20 '08 #2
Hi Billy,

Do you have any further questions on this? If so, please feel free to post
here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
Aug 22 '08 #3
Your problem is when the user is closing IE without clicking on the
'logout' button.

Add a Global.asax file to your project.

Add the following function to the global.asax file

protected void Session_End(object sender, eventargs e)
{
// Put your code here to change the status in the database
}
Hope this helps you in the right direction

frederik Van Lierde
http://www.SilverSandsAssociates.com
http://BlueBizTalk.blogspot.com
Aug 22 '08 #4

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

Similar topics

18
by: | last post by:
Please help. After a number of wrong turns and experiments I need advice on login management system to secure our web pages without inconveniencing our visitors or our internal staff. What I...
3
by: Gary | last post by:
Hi, guys! Some of my applications are sharing same SQL login/password to connect to a database called "MyDB" on server "MyServer" . The password is encrypted and stored in registry or some...
3
by: tchangmian | last post by:
I want to limit user login by writing ASP program. In details, if a user had logged in wrongly for more than three times, then the user will not be abled to log in to the system anymore even...
6
by: Hannu | last post by:
Hi. In the ldb file you can see the users of the mdb-file. If you open the mdb-file your machine and username will be written in the lbd- file. Allthough you close the mdb-file your name won't...
5
by: vincent | last post by:
Hi, If i login to the site again (may be in the same pc or different pc), system must allow me in and end my previous session. How do i go about doing this? This is to ensure that an user...
12
by: Michael | last post by:
Please Help me. I've got a .Net 2003 program that attaches to a SQL Server machine and I'm getting the above error when a user tries to log in. The SQL server is setup to use Windows Auth. and I...
2
by: mark4asp | last post by:
This is a simplified version of my site. There are Premium users who have access to the Premium directory. Anyone else attempting to access it should be logged and then redirected to the...
10
by: Drew | last post by:
I am trying to limit access to certain pages on our intranet, and have been using the following code to do so, dim Login, L, LL, StringLen, NTUser Set Login =...
0
by: parun | last post by:
Hello, is there a possibility to log on to a user whose length is greater than 8 characters. My system is AIX and system base authentication . At IBM I found this information: Limit Windows...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.