Solved

How do i use asp.net forms authentication and make sure that each user is able to login ONLY once?

Posted on 2003-11-01
5
227 Views
Last Modified: 2010-04-06
I'm writing an appliocation in ASP.NET c# and i have a problem. i'm using the Forms Authentication provided by asp.net and the user list is in the web.config file, i want to make sure that a user can login ONLY once and if he does login the second time (lets say from a diffrent computer though it could be from the same) that application will signOut the old user and login the new one...
if someone can help! i'll be very happy!
0
Comment
Question by:TCDooM
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:jimmack
ID: 9663143
I can't answer the question (since I do JSP development not .NET), but I do have a suggestion.

Obviously, it depends on the purpose of your application, but (for security/site integrity purposes) wouldn't it be better to either:

a) prevent the second login
b) warn one or both users that a second login has occurred (or been requested)
c) at least log the event for audit purposes.

In a Servlet/JSP system, you would use a ServletContext (or application level attribute) to check this, or have a flag in a database indicating when a user is logged in.

Just some stuff to think about ;-)
0
 

Author Comment

by:TCDooM
ID: 9665232
sure, i know all that stuff, what i was thinking about was a way to do this without writiing the whole code for it! i know how to write an application object that will handle the logins in the system, BUT i was thinking mybe there is a built in way to do it with the .NET forms.
thanks anyway.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9665317
I doubt it :-(
0
 

Author Comment

by:TCDooM
ID: 9665375
it seems kind of elementry, doesn't it?
i think that the functionality is even implemented in windows 2k, maybe the solution will come from there...
0
 
LVL 2

Accepted Solution

by:
ericsDev earned 500 total points
ID: 9668848
I think this is what you may be looking for :)

http://www.eggheadcafe.com/articles/20030416.asp
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
XML problem with Internet Explorer 7 45
error email attachment VB2010 5 39
Read XML Response From ASP Classic 9 69
Magento Indexing 1 95
When you work with shopping cart / ecommerce relates web sites, you need to pass the certain form post details to the payment gateway process page with required details for the products items you give to order. Also you may need to track the ordered…
It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

775 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