The server did not provide a meaningful reply; this might be caused by a contract mismatch
This issue occured when my client system tried to receive a large amount of data from a WCF service. So, to fix this exception, I added the ServiceBehaviour in both client application and WCF service. In the ServiceBehaviour, add DataContractSerializer and set its maxItemsInObjectGraph to higher value.
<serviceMetadata httpGetEnabled=”true” />
<serviceDebug includeExceptionDetailInFaults=”true” />
<dataContractSerializer maxItemsInObjectGraph=”2147483647″ />
Also, set the behaviour name in the behaviour configuration under service tag.
<endpoint address=”” behaviorConfiguration=”” binding=”basicHttpBinding”
bindingConfiguration=”TestBinding” name=”basicEndPoint” contract=”WCFService.IManager”>
<dns value=”localhost” />
No comments yet.