Reputation: 5469
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 (e.g. user ends his process). How to detect, this client is disconnected and notify other clients?
Upvotes: 0
Views: 1326
Reputation: 9680
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.
Upvotes: 4