mcbridedm
asked on
How important are the readerQuotas settings in a SVCUtil generated WCF proxy class when on the Client side of a WCF service?
I'm unable to use the .config file as I'm working on a DLL and do not have access to the main apps .config to copy my content into. To get around this, I'm manually building up the BasicHttpBinding object using the same settings specified in the app.config that was generated with SVCUtil and using this binding to create my client object of type proxy class.
Some of the webservice calls are posting files to the service and receiving back files of roughly the same size but in a different format. All is working great except when trying to receive files above the size of 16384 bytes which appears to match consistently with the readerQuotas maxArrayLength.
How important is it that these settings remain consistent with what was originally generated from the service itself using svcutil? Are the readerQuota settings client side specific, in which case I can set whatever I like?
<readerQuotas maxDepth="32" maxStringContentLength="81 92" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="163 84" />
Some of the webservice calls are posting files to the service and receiving back files of roughly the same size but in a different format. All is working great except when trying to receive files above the size of 16384 bytes which appears to match consistently with the readerQuotas maxArrayLength.
How important is it that these settings remain consistent with what was originally generated from the service itself using svcutil? Are the readerQuota settings client side specific, in which case I can set whatever I like?
<readerQuotas maxDepth="32" maxStringContentLength="81
maxBytesPerRead="4096" maxNameTableCharCount="163
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IServiceProvider" 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="Mtom" 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>
<client>
<endpoint address="http://test.com:10002/Service/Service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IServiceProvider"
contract="IServiceProvider" name="BasicHttpBinding_IServiceProvider" />
</client>
</system.serviceModel>
</configuration>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER