Error:
WCF Client returns the following error …
System.ServiceModel.CommunicationException: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
Fix:
Note: This is a client setting, not a server setting.
For WCF Test Client
Right Click on “Config File” -> Edit with SvcConfigEditor
Go to Bindings -> Your Binding -> edit “MaxReceivedMessageSize”
For WCF Client
<!-- Max Receive Size set to 2MB = 2097152 -->
<binding name="BasicHttpBinding_IWSStore" maxReceivedMessageSize="2097152"/>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IWSStore" maxReceivedMessageSize="131072" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:55484/WSStore.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IWSStore" contract="IWSStore"
name="BasicHttpBinding_IWSStore" />
</client>
</system.serviceModel>
</configuration>
Sources:
https://idreesdotnet.blogspot.com/2019/01/wcf-test-client-how-to-increase.html
Comments