Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

checking if a user is already logged into asp site

Posted on 2007-11-19
5
Medium Priority
?
909 Views
Last Modified: 2013-12-17
Is it possible to check if a user is already logged into an asp site ... i.e. as a user is entering their username/password and submitting -- to then check to see if they are logged in already (perhaps on a different pc) -- then log off the existing session (blocking access via previous login status) and then allow the new user to log in etc.

how do I check and action this type of transaction please?

your time and efforts with this enquiry are much apprieated.
0
Comment
Question by:amillyard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 1600 total points
ID: 20312327
Are you using Forms authentication?  Are you storing a cookie on the machine for the authenticated user?

Bob
0
 

Author Comment

by:amillyard
ID: 20313333
TheLearnedOne:

aspx forms that is -- using login.aspx / combined with login controls.  not aware of using cookies as using db connection for authentication.  asp creates a template db for sql 2005.

have not used any cookies yet on any web-page, as normally try to avoid storing local data, 1.security, 2. less browser issues, 3. centrally managed user data (allowing mobile users and more consistant information share)
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 1600 total points
ID: 20313688
You can persist the state of user logins with Forms authentication using cookies:

Explained: Forms Authentication in ASP.NET 2.0
http://msdn2.microsoft.com/en-us/library/aa480476.aspx

See "Forms Authentication Cookies" section.

Bob
0
 
LVL 1

Assisted Solution

by:arshadd
arshadd earned 400 total points
ID: 20333252
I think you should have a user's table where you should be storing User Id Password add a field logged and IP in when the user logged in set this field to true and srore the IP. and if you want to expire the already logged in user just signout him.
0
 

Author Comment

by:amillyard
ID: 20333405
arshadd:

yes, understood.

what about if someone gets 'logged out' by asp because of inactivity or when the browser is close via the top-right 'x' and or closes unexpectedly (like a crash) -- how would this table be updated...this could potentially mean that someone could never logged back in if table not updated.

how would I capture those other updated events of inactiivty and unexpected browser closes.
0

Featured Post

Give Your Engineering Team a Productivity Boost

Learn why container technology is so powerful and how it can provide your team with productivity gains and other benefits.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question