I have a WCF service that returns a lot of data. So much so that I needed to increase the maxBufferSize and the maxReceivedMessageSize. My endpoint and binding look like so:
<endpoint
address=""
binding="basicHttpBinding"
bindingConfiguration="ExtendedBinding"
contract="NAThriveExtensions.INableAPI"
/>
<bindings>
<basicHttpBinding>
<binding
name="ExtendedBinding"
maxBufferSize="655360"
maxReceivedMessageSize="655360" >
</binding>
</basicHttpBinding>
</bindings>
As far as I can tell the above is configured correctly. When I access my webSerice through the WCFTestClient (with the service either being hosting in VS or IIS) I check the config and
1) The client section does not have the name of my bindingConfiguration in it
<client>
<endpoint
address="http://wikittybam/NAThriveExtensions/NableAPI.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_INableAPI"
contract="INableAPI" name="BasicHttpBinding_INableAPI" />
</client>
2) The binding that gets sucked into the client does not have an updated maxZBufferSize or maxReceivedMessageSize, and transport and message security stubs are being pulled over somehow.
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_INableAPI" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
I know that bindingConfiguration works as I was able to test transport security through the WCFTestClient. Any insight would be appreciated.
Thanks!
As far as I remember, that detail of binding parameters are not publicly exposed in the published metadata. The only reason why the service proxies generated using VS/Svcutil contain all that is because, well, they are very dumb and serialize the binding configurations with all the values, even though all of them contain the standard default values!
IOW, you're going to have to manually tweak your client configuration.