I have a ASP.Net Web application hosted on a server.
I want to restrict same user to login on different machines over the network connection but with certain conditions to be satisfied.
So I thought of adding three new columns to the User table so that we can track if same user is logged in on same or different machines.
Those columns are like :
IsLoggedIn: To check if the particular user is already logged in or not.SessionID: To check if the same user instance is opened.IPAddress: To check if the same user is on same or different PCs.
This should satisfy some of the below conditions, but it fails to satisfy some of them.
Conditions are as follows :
- Both computers are on the same LAN.
- Each computer is accessing the application over the internet from different locations.
- Each computer is accessing the application over the internet from the same location.
- Some of the application hosted which means that IP address alone is not sufficient to distinguish different computers.
- Some users just close the browser without logging out. So sessions may not be ended at this situation.
Can anybody suggest how to accomplish all these conditions to satisfy with my application ? Mainly 4th and the 5th .
Thanks in advance.