简体   繁体   中英

Check all clients connection to wcf service

I've wcf service to which connect several clients. If one of them wants disconnect then end proxy session, notify other users etc etc

But sometimes client disconnects from wcf service unproperly (eg user ends his process). How to detect, this client is disconnected and notify other clients?

As clients disconnect abruptly you will not come to know on your service side if client is disconnected, so you will have to manually disconnect the user.

For this you will need to add LastAccessTime property in your session object. Once this in place you will have to write a back ground worker role which will disconnect the session on basis of LastAccessTime . In every request you will update this time with current time.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM