473,785 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4043
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(a fter he has login) in multiple requests to the
same server application(fro m 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:

#SqlMembershipP rovider..::.Get NumberOfUsersOn line Method
http://msdn.microsoft.com/en-us/libr...lmembershippro
vider.getnumber ofusersonline.a spx

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****@microsof t.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?QmlsbHkgWmh hbmc=?= <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****@microsof t.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(obj ect 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
2477
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 need: A system whereby the user only has to register ONCE and he will have automatic entry to ANY page without havinto to RE-LOGIN even if he comes in
3
1968
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 configuration file the applications use. The applications use certain arithmetic to decrypt the password and then connect to MyDB. The problem is a few developers know the arithmetic. So virtually there is no security here.
3
2388
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 thought he key in correctly the username and password in the 4th time. That's means he cant login forever until the administrator edit his status in the database Can i refer to any ASP sample coding for this application?
6
12356
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 disappear from the ldb-file, before every user has closed the mdb-file. I have heard that there will be problems if the amount of users will be over 10 in mdb-files. Is that true? Hannu
5
5673
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 can have only one session at a time.
12
6575
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 have added the new user to the database and have given the user access to the database for the app. But everytime I try and login using this users ID, I always get the error: Login failed for user Christian.Gaut If I login using my userid and...
2
2082
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 Premium.aspx - which explains the advantages of being a Premium member and provides examples of content. The default page for site visitors is "News/Default.aspx" but only those with cookies set should go there otherwise visitors need to login to...
10
2476
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 = Request.ServerVariables("LOGON_USER") L=Len(Login) LL=InStr(Login, "\") StringLen=L-LL NTUser = (Right(Login, StringLen))
0
2544
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 Linux / UNIX Group Name Length Up to 30 characters Up to 30 characters User Name Length Up to 30 characters (1) (2) Up to 8 characters Case Case insensitive Lowercase only I have created a user system and I can login in the system, however, when
0
9645
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...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10091
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,...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6739
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
5381
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
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.