6

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?

Aishwarya Shiva
  • 3,460
  • 15
  • 58
  • 107

3 Answers3

6

Maybe this error comes from the client and not the server. Make sure same setting exists on the client config.

Yaron Naveh
  • 23,560
  • 32
  • 103
  • 158
  • I got the same error when i debug the service alone through WcfTestClient. I have increased size in my binding. Can you tel me a way come out this? I have post my question on http://stackoverflow.com/questions/22934530/two-endpoint-with-two-binding-configuration-for-a-service Help me – Programmer Apr 09 '14 at 06:07
2

WCF server side settings are irrelevant in this case. Client-side binding config is your enemy ...

KristoferA
  • 12,287
  • 1
  • 40
  • 62
  • ...along with 'WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10'. Really...? – KristoferA Aug 25 '13 at 15:37
1

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.

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331