I am trying to access a WCF service from a Windows Forms client application. My binding config on server is this:
<bindings>
<customBinding>
<binding name="Wrabind" closeTimeout="00:05:00" openTimeout="00:05:00"
sendTimeout="00:25:00">
<textMessageEncoding />
<security authenticationMode="SecureConversation" includeTimestamp="true"
messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
<localClientSettings maxClockSkew="00:30:00" />
<localServiceSettings maxClockSkew="00:30:00" />
<secureConversationBootstrap messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
<localClientSettings maxClockSkew="00:30:00" />
<localServiceSettings maxClockSkew="00:30:00" />
</secureConversationBootstrap>
</security>
<httpTransport maxBufferPoolSize="20000000" maxReceivedMessageSize="20000000"
allowCookies="true" maxBufferSize="20000000" />
</binding>
</customBinding>
</bindings>
As you can see I already set the maxReceivedMessageSize
to 20000000, but its still showing "The maximum message size quota for incoming messages (65536) has been exceeded."
exception. Am I missing something?
Maybe this error comes from the client and not the server. Make sure same setting exists on the client config.
WCF server side settings are irrelevant in this case. Client-side binding config is your enemy ...
From here:-
You may need to add the "binding.MaxBufferSize = 2147483647" as well. "ServiceReferences.ClientConfig" will get auto updated once you've updated or re-configured the service reference. Hence if you've provided correct binding configurations at the service level using "App.config" of your WCF service lib, that configuration will get auto inherited to the consuming silverlight client. But all these will not come to effect if you are creating the bindings dynamically in code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With