Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this WCF service where clients of my application can login and register to the Service. I keep a list of all connected clients. But what if a Client is accidently disconnected without telling de service? How can I remove it automatically??

I tried to use a timer which would poll with all clients asking if they are alive but I can't figure it out how to make a good method to do all this.

Please Help!
Posted
Comments
Thomas Nielsen - getCore 5-Mar-14 8:32am    
What type of binding do you use on the endpoint?
Joukuh 5-Mar-14 8:38am    
I'm using the net.TCP binding.

1 solution

 
Share this answer
 
Comments
Joukuh 5-Mar-14 9:03am    
@KR that's not what I need. I need a method that is running at the Service Side to check if clients are alive or not.
Krunal Rohit 5-Mar-14 9:05am    
Yeah create the method in service itself.

-KR
Joukuh 5-Mar-14 9:07am    
But then it doesn't make sense what you are saying...... If I make a method at service side to check service availability and the service goes down then the method won't run..

Thats why I need a method that checks if the CLIENTS are alive, if not then remove from the list at the SERVICE.
Krunal Rohit 5-Mar-14 9:13am    
See http://stackoverflow.com/questions/3986347/wcf-duplex-retrieve-client-connection

-KR

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