Click here to Skip to main content
13,045,285 members (68,773 online)
Rate this:
Please Sign up or sign in to vote.
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 25-Oct-11 11:12am
What do you mean "the service cannot call back the CLient"?
L_Coelho 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<iduplexcallback>();


// 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 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
Top Experts
Last 24hrsThis month

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