tags:

views:

14

answers:

1

Hi

I am developing a Window Form Application Form Application is using WCF to get data from db servers. My Clinet'd like to see users who are currently using application. I means Administrator want to get administrative page to who all user IDs currently connected to WCF Server. I don't know how to get this. I think i can catch userID after authentication proccess. But I don't know how to check Whether the user is logged out or not If abnormal proccess happens (ie. Client PC was shutdowned by power failure) Please Give me hints or advice. I appreciate it

A: 

You need to implement this at the WCF Service level. It needs to maintain a list of users that have logged in and then notice which users have logged out. If you only have a single WCF Service running the you can just cache the information on that machine and returned the list of logged in users as another of its methods. If you have multiple machines running the WCF Service then you would need to use a back end database to store the information as the service would need to be stateless.

To notice when clients crash or shut down the machine you need to add a call to the WCF Service every 5 minutes. Like a ping that informs the WCF Service the apps is still running and the user logged in. If more than 5 minutes pass then your service can assume the user is now logged out.

Phil Wright