System.ServiceModel.Dispatcher.NetDispatcherFaultException: The formatter threw an exception while trying to deserialize the message
This exception is thrown when your client application receives a large data from WCF service and it is not able to deserialize them. So, you have to set the DataContractSerializer property in the EndPointBehaviour in your client application. To do that, you can edit your web.config file using WCF Service Configuration Editor (available in the VS -> tools menu)
Add the endpointbehaviour and set its name under the client endpoint tag. Once you do that, your web.config will look like,
<dataContractSerializer maxItemsInObjectGraph=”2147483647″ />
<endpoint address=”http://mySystem/WCFService/Manager.svc” behaviorConfiguration=”NewBehavior”
contract=”MyServiceReference.IManager” name=”basicEndPoint” />
No comments yet.