JG Vimalan's Blog

It is all about coding!

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.

        <behavior name=”WCFService.Service1Behavior”>
          <serviceMetadata httpGetEnabled=”true” />
          <serviceDebug includeExceptionDetailInFaults=”true” />
          <dataContractSerializer maxItemsInObjectGraph=”2147483647″ />

Also, set the behaviour name in the behaviour configuration under service tag.

      <service behaviorConfiguration=”WCFService.Service1Behavior”
        <endpoint address=”” behaviorConfiguration=”” binding=”basicHttpBinding”
          bindingConfiguration=”TestBinding” name=”basicEndPoint” contract=”WCFService.IManager”>
            <dns value=”localhost” />


October 20, 2010 - Posted by | WCF

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: