I have a web service which is returning data to the desktop application. The problem I am having is, when the web service returns small volume of data everything works fine but
I recently had this issue.
It turned out that analyzing the WCF log as written by the System.Diagnostics.XmlWriterTraceListener yielded a problem with the data contract I had set up.
I am returning Dictionary
(Side Note: Yes, I know this is really bad!, but I am young and need the money). I forgot to include the [KnownType] attribute on the return value for the DataContract:
[DataContract]
[KnownType(typeof(Dictionary))]
[KnownType(typeof(Dictionary))]
[KnownType(typeof(Dictionary>))]
public class MyCoolObject: ICoolObject
{
[DataMember]
public Dictionary Results
{
get { return _results; }
set { _results = value; }
}
}