Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

my Question goes like this:

How can I save the clients that are currently connected to a WCF service, so that the service can load them after it has been restarted?

My current Scenario is as follows:
I have clients that connect to a Service in a Publish /Subscribe way. The service keeps an internal list that stores the Client Callbacks, so the server can communicate with them at any given time.
The Clients do not change very often. Once a month or so a new Client gets added or one gets removed. They are online every time.

I would now like to be able to serialize the callbacklist with all the clients, so I can load them after the service has been restarted. This way the service could talk to the clients without having them to subscribe again.

Some toughts
- I'd like to avoid any client polling (e.g. firing up a method periodically so a client gets connected again after the service has been restarted)
- I don't want the Clients to be manually configured on the services side.
- Maybe there is some way to read/save the connection credentials from a calling client without using callbacks. Then I could connect in a normal way....



Thanks in advance for your help

Best regards

immes
Posted
Updated 1-Feb-13 5:48am
v5

I have my doubts about this working. What happens if you save the delegate, but the client app closes, possibly because your service isn't responding?? Now you've got a callback to a client that doesn't exist any more. What then??
 
Share this answer
 
Hi,

that is no Problem. When this happens I will delete the client from the list.
He can connect again later.
Regarding the overall process this is fully acceptable.
 
Share this answer
 

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