R – WCF exception – “Service not found” when retrieving large collection


my WCF service it's used by a Silverlight application to retrieve data. I've no problem,

MyCollectionClass GetList(int sessID, string name);

public class MyCollectionClass : List<MyClass>{ }

public class MyClass {

  public string Prop1 { get; set; }

  public string Prop2 { get; set; }


But.. when MyCollectionClass have a less then 3000+ "record" it works. When the number of records is greater the WCF service seems to work, but on the completed event of the Silverlight app an exception occurs: "Service Not Found".
I've found that could be related to service configuration and i've tryied to use both:


on WCF and Client configuration. Also added:


(also changed the values found) But seems to not working.
I think that the problem is that the message exceed the max number of byte per "message", but I do not understand why data is not spanned on different message.
Any tips is appreciated.


Best Solution

I had the same problem, in my case was just serializing an string and no prob there, BUT in your case you are serializing a big bunch of objects, there's a default limit for that, I remember I saw a post about that (just a setting in the config --> maxItemsInObjectGraph) to high up that number of serialized objects,


http://silverlight.net/forums/t/17674.aspx http://forums.asp.net/t/1330713.aspx


HTH Braulio