Rush Frisby
Rush Frisby

Reputation: 11454

WCF binding not being read

I am using a basic http binding and have set maxReceivedMessageSize="2147483647" on both the client and the service. My service is throwing an error however, with this message:

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.

I know it's using my binding because that's the only one I've enabled and other method calls work fine. Is this just a generic message and my object is really bigger than 2147483647 not 65536?

The binding looks like this on both the client and server

<basicHttpBinding>
    <binding name="basicHttpBinding" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="16384" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
</basicHttpBinding>

Upvotes: 0

Views: 662

Answers (1)

carlosfigueira
carlosfigueira

Reputation: 87218

You likely have a name mismatch in the config between the name attribute of the <service> element and the actual service name. The name must be the fully-qualified name of the service class.

Upvotes: 2

Related Questions