You need to make changes on both sides - the server and the client, but you need to bind to the corresponding binding - the one that your service (and the client) actually uses!
So, in your case, on your server service, the service is configured to use wsHttpBinding
:
<service name="WcfServiceZone_Store.Service1" behaviorConfiguration="metadataBehavior"> <endpoint address="" binding="wsHttpBinding" contract="WcfServiceZone_Store.IService1"> *************
but you defined higher values on basicHttpBinding
..... that won't work of course!
<bindings> <basicHttpBinding> **************** this doesn't match with the defined binding on your endpoint!
And you also do not refer to the new binding configuration that you defined - you need TELL WCF to use these new binding values!
So you need to do this on the server:
<system.serviceModel> <bindings> <wsHttpBinding> <binding name="BindingWithMaxSizeIncreased" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> </wsHttpBinding> </bindings> <services> <service name="WcfServiceZone_Store.Service1" behaviorConfiguration="metadataBehavior"> <endpoint address="" binding="wsHttpBinding" bindingConfiguration="BindingWithMaxSizeIncreased" -- use those new values! contract="WcfServiceZone_Store.IService1"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services>
The same on the client side:
- define binding parameters for proper binding (
wsHttpBinding
- not basicHttpBinding
) - add a link to
bindingConfiguration
in the <endpoint>
so that these values are actually used
source share