Click here to Skip to main content
11,805,266 members (51,170 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: WCF Server service CLI
Hi, I got a WCF service working with callbacks. Everything works fine when I pass an integer to wcf service, and then the service call back to client another integer.

But when I try to pass a complex type, like List<string> to WCF service, the service cannot call back the CLient.

Anyone has experienced this ??
Need help.
Posted 25-Oct-11 4:56am
Mark Salsbery at 25-Oct-11 11:12am
What do you mean "the service cannot call back the CLient"?
L_Coelho at 25-Oct-11 12:03pm
I mean the Server side cannot send result to client side...

public void GetData(ObservableCollection<People> listValues)

IDuplexCallback Callback
return OperationContext.Current.GetCallbackChannel();


// Construct InstanceContext to handle messages on callback interface.
InstanceContext instanceContext = new InstanceContext(new CallbackHandler());

// Create a client.
DuplexServiceReference.DuplexClient client = new DuplexServiceReference.DuplexClient(instanceContext);


public class CallbackHandler : IDuplexCallback
public void ResultData(ObservableCollection<People> listInt)

When debugging, I enter in the server code. When the server (service) code try to call back the client (Callback.ResultData) it fails with timeout exception.

But if i instead of ObservableCollection I use an integer, it works.
Mark Salsbery at 25-Oct-11 19:28pm
You stated "like List<string>", not ObservableCollection<People>. Is your People class WCF-serializable? Does it work if you use List<People>?

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

  Print Answers RSS
0 OriginalGriff 315
1 Richard Deeming 200
2 Sergey Alexandrovich Kryukov 170
3 CPallini 160
4 CHill60 150
0 OriginalGriff 3,255
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web02 | 2.8.151002.1 | Last Updated 25 Oct 2011
Copyright © CodeProject, 1999-2015
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