Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 27th, 2006, 12:41 AM
Authorized User
 
Join Date: Feb 2005
Location: Pune, Maharashtra, India.
Posts: 11
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to amitjoshipune Send a message via Yahoo to amitjoshipune
Default Prevent mulitiple logins in webgarden/farm senario


Hi,
I am working on asp.net C# and SQL server.
I am trying to creat login class. My problem is how to
prevent one user login multiple times simultaniously
.
I wish that only one use should be connected at a time.
only few previlaged people should be able to login multiple
times simultaniously like admin people.
I am going to use SQL server to store session state. Also
I have to deploy this website in Web garden/ web farm senario.

Please let me know urgently any solution.
Regards,
Amit Joshi
Pune, Maharashtra, India.



  #2 (permalink)  
Old July 27th, 2006, 06:30 AM
Authorized User
Points: 375, Level: 6
Points: 375, Level: 6 Points: 375, Level: 6 Points: 375, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2006
Location: New Delhi,India.
Posts: 79
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via AIM to anujrathi Send a message via MSN to anujrathi Send a message via Yahoo to anujrathi
Default

Hi Amit,

For this purpose, use Application_AuthenticateRequest in global.asax.
when ever a user logged in & authenticate then store his/her user id (pls note not Session id bcoz it will different for every session, Session.SessionID).
So store user's unique userid in session variable & store it in a saperate database table. & Session_End subroutine remove the user's userid frm database table & also from Session variable.& whenever any user logged in check that this user id is present in the table or not.

So, what happens, u have the all current users that logged in in ur site. Now u can write any code to block the newer user or any other.

Regards,
Anuj Rathi
  #3 (permalink)  
Old August 3rd, 2006, 02:18 AM
Authorized User
 
Join Date: Feb 2005
Location: Pune, Maharashtra, India.
Posts: 11
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to amitjoshipune Send a message via Yahoo to amitjoshipune
Default

I will try this solution. But if I use SQL server 2 store session state then Session_End does not get fired. So what to do in such cases?
Regards,
Amit Joshi
Pune, Maharashtra, India.

  #4 (permalink)  
Old August 3rd, 2006, 07:11 AM
Registered User
 
Join Date: Aug 2006
Location: Chennai, Tamil Nadu, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey why can't U a master table containing flags that gives the authentication level of each user .
if U have this status then in Ur code U can check for that and then start\restrict multiple sesssions right?
  #5 (permalink)  
Old August 18th, 2006, 02:21 AM
Authorized User
 
Join Date: Feb 2005
Location: Pune, Maharashtra, India.
Posts: 11
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to amitjoshipune Send a message via Yahoo to amitjoshipune
Default

ok Antony,I will try this trick.and convey results.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mulitiple/Nested IIF statements rohit_ghosh Access VBA 3 June 1st, 2007 10:44 AM
Passing Mulitiple pameters to a form query c_olinrb Access 3 January 19th, 2007 03:25 PM
mulitiple field query PLUS Durwood Edwards Classic ASP Databases 2 July 14th, 2005 10:54 AM



All times are GMT -4. The time now is 07:45 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.