Click here to Skip to main content
13,554,524 members
Rate this:
Please Sign up or sign in to vote.
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

Posted 1-Feb-13 1:22am
Updated 1-Feb-13 5:48am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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??
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


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.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03-2016 | 2.8.180515.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100