Msgstr "The maximum exceeded message size quota for incoming messages (65536) has been exceeded.". Even after installing a larger size

I am trying to access the WCF service from a Windows Forms client application. My server binding configuration is as follows:

<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 maxReceivedMessageSize to 20,000,000, but still showed the exception "The maximum message size quota for incoming messages (65536) has been exceeded." . Did I miss something?

+6
source share
3 answers

Perhaps this error comes from the client, not from the server. Verify that the same setting exists in the client configuration.

+6
source

WCF server-side settings in this case do not matter. Client-side binding configuration is your enemy ...

+2
source

From here : -

You may need to add "binding.MaxBufferSize = 2147483647". "ServiceReferences.ClientConfig" will be automatically updated after updating or reconfiguring the service link. Therefore, if you provided the correct service level binding configurations using "App.config" from your WCF library, this configuration will be automatically inherited by the silverlight consumer. But all this will not happen if you dynamically create bindings in the code.

+1
source

Source: https://habr.com/ru/post/952460/


All Articles