How to restrict multiple logon to an application?
-
pls help me to restrict multiple logons to an application with single user account
-
pls help me to restrict multiple logons to an application with single user account
What Login control are you using? The logical way would be to check if the user has logged in by say; storing their login value in a temp table or session and then check that on the event which logs a user in, if their login id already exists in a temp table then give message showing that they are already logged in.
The answers posted by me are suggestions only and cannot be used in anyway against me.
-
What Login control are you using? The logical way would be to check if the user has logged in by say; storing their login value in a temp table or session and then check that on the event which logs a user in, if their login id already exists in a temp table then give message showing that they are already logged in.
The answers posted by me are suggestions only and cannot be used in anyway against me.
thanks .netman for quick reply. And i want to know , we can get session_end event if user logs out and we can updated the table details in this event. but how to identify if user logs in and quits by closing the browser.
-
pls help me to restrict multiple logons to an application with single user account
there are several ways to doing this. some are as follows [1]==> you should have create array(table, array list) of all login users and stored in application object. when new user will login, then first what you have to do is check if the user id exist in application object. if yes then, restrict him. when user log out then delete entry from application object. [2]==> you should make a boolean field in user master table in your database. when use login then set it true. and when user log off set it to false. make sure every login time that in database this field for that user set to false. Regards, Dilip Patel Sr. Software Engineer (.Net).
-
there are several ways to doing this. some are as follows [1]==> you should have create array(table, array list) of all login users and stored in application object. when new user will login, then first what you have to do is check if the user id exist in application object. if yes then, restrict him. when user log out then delete entry from application object. [2]==> you should make a boolean field in user master table in your database. when use login then set it true. and when user log off set it to false. make sure every login time that in database this field for that user set to false. Regards, Dilip Patel Sr. Software Engineer (.Net).
thanks dilip for ur reply. But how to identity things like 1) what if the user logs in and log out by closing browser close button. 2) What if the user logs in and leave behind. thanks inadvance........
-
thanks dilip for ur reply. But how to identity things like 1) what if the user logs in and log out by closing browser close button. 2) What if the user logs in and leave behind. thanks inadvance........
Do u got any solution . Plz let me know if u got it. I am also looking for the same. cheers, sekhar
-
thanks dilip for ur reply. But how to identity things like 1) what if the user logs in and log out by closing browser close button. 2) What if the user logs in and leave behind. thanks inadvance........
If user doesn't log out before closing the browser, I don't think you have a choice but to wait for the session to expire. Except for... I did write an application once where I needed to positively know that a user's browser window was still open. I added a heartbeat feature so that the server would know when the browser was closed. Consisted of an empty paged named heartbeat.aspx page that had a tag. This causes the page to get refreshed every 30 seconds. Then include the page in a 0x0 pixel frame on all your web app pages (using a master page). Now every page of your application will have a heartbeat. Just add code-behind to hearbeat.aspx to automatically log them out if you don't get a heartbeat for over 30 seconds (or whatever value you want). Obviously not something you want to do on a high-traffic website but sounds like your application is low traffic - i.e 1 user at a time ;)