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
|