In my project i have to implement an interface which shows whether a particular user is online or not as in social networking site(like orkut and facebook)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are using ASP.NET and the membership provider there are a bunch of different implementations. Here is a link to one:
http://blog.dreamlabsolutions.com/post/2009/07/13/ASPNET-Membership-Show-list-of-users-online.aspx
If you are not then you will need to be storing when users sign in to your system and keep track of everytime they are ‘active’ somewhere. I have done this using a the global cache but it really only works for single server solutions. You will need to move to DB storage if you want to use multiple servers but then that is pretty much what the ASP.NET membership will provide you out of the box with very little coding.
You can choose how to write to your datastore (such as cache) and expire ‘sessions’ based on how ever you want such as a specific time period of inactivity, the
Session_Endevent, a logout command, etc…