Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I am Developing a Web application in asp.net where i need to Get the Logged in user Time and Logged out user time..

Also suggest any Alternatives for the mentioned above

Please Help Me

Thanks and regards
Devkranth kishore
Posted
Comments
ZurdoDev 6-Mar-13 7:06am    
Logged in time is easy right, because you have to validate them so you know when they login. Log out is not so easy because it is the web. You can't capture every way they leave your site.
Azziet 6-Mar-13 7:45am    
ryan is right...you can store in table loggedin time when user validates to login....but logged out time is difficult

1 solution

A way that would only work in browsers whith Javascript enabled. Track each page hit per user and send back a "ping" to the server in a given interval. Scan the database in certain intervals an when the time interval of the last activity of a user was longer ago than the given interval, mark that user as logged out.

Regards,

— Manfred
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900