0

I'm sending an array to a WCF service, and I'm getting a Protocol Error when the array exceeds about 2400 items. I'm trying to increase the size accepted by the service by modifying web.config file for the service, but not having any success. Here is relevant code from the web.config:

    <system.web>
    <httpRuntime maxRequestLength="2097151" />
    <compilation debug="true" targetFramework="4.5"/>
    <pages controlRenderingCompatibilityVersion="4.0"/>
  </system.web>
  <system.serviceModel>
    <services>
      <service name="prop84r4Service.ServiceProp84r4" behaviorConfiguration="ServiceBehavior">
        <endpoint address="" binding="webHttpBinding" contract="prop84r4Service.IServiceProp84r4" behaviorConfiguration="web" bindingConfiguration="webHttpBindingDev">
        </endpoint>

      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="webHttpBindingDev">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"  maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </webHttpBinding>
    </bindings>
    <behaviors>

Any ideas what I'm doing wrong or not doing?

Thanks

pvitt
  • 1,005
  • 4
  • 14
  • 31
  • Possibly maxItemsInObjectGraph. See http://stackoverflow.com/questions/9191167/maximum-number-of-items-that-can-be-serialized-or-deserialized-in-an-object-grap – Brian Mar 24 '16 at 15:46
  • Possible duplicate of [WCF - How to Increase Message Size Quota](http://stackoverflow.com/questions/884235/wcf-how-to-increase-message-size-quota) –  Mar 25 '16 at 04:07
  • the maxrecievedmessagesize answer on this link solved the problem -- Thanks! – pvitt Mar 28 '16 at 14:49

1 Answers1

0

the maxrecievedmessage size parameter on the binding solved my problems located at this link:

WCF - How to Increase Message Size Quota

Community
  • 1
  • 1
pvitt
  • 1,005
  • 4
  • 14
  • 31