Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET WCF VB.NET
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 1-Feb-13 2:22am
immes274
Edited 1-Feb-13 6:48am
v5
Rate this: bad
good
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??
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 240
1 Kamal Rocks 184
2 BillWoodruff 173
3 Sergey Alexandrovich Kryukov 170
4 PIEBALDconsult 160
0 OriginalGriff 5,695
1 DamithSL 4,506
2 Maciej Los 4,007
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2014
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