title: WCF Service - Array Size limitations
body: <p>I have a WCF service method I've implemented that gets passed an IEnumerable</p>
  
  <pre><code>    [OperationContract]
      List&lt;Item&gt; GetItems(DateTime sinceDate, IEnumerable&lt;Guid&gt; idList);
  </code></pre>
  
  <p>The method works as intended when passing in an IEnumerable of size 1000 or fewer; the service returns with an expected response. At some point, the array passed in is too large (seen at 2000 items) and a <code>System.ServiceModel.ProtocolException</code> is thrown, <code>"{"The remote server returned an unexpected response: (400) Bad Request."}"</code></p>
  
  <p>I'm not sure what's governing the array size limitation. I'm aware of the readerQuotas section of a binding, and the maxArrayLength is set to the default 16384. My buffer sizes are set large enough, but I'm not sure why the service call is failing. Is there a limitation on the basicHttpBinding for array sizes passed in? What needs to change in my configuration so that I can pass in large arrays?</p>
  
  <p>Here is my app.config in the client side. Server side is equivilant.</p>
  
  <pre><code>&lt;binding name="BasicHttpBinding_IMyService" closeTimeout="00:01:00"
        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferSize="20000000" maxBufferPoolSize="524288" maxReceivedMessageSize="20000000"
        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
        useDefaultWebProxy="true"&gt;
        &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
        &lt;security mode="None"&gt;
              &lt;transport clientCredentialType="None" proxyCredentialType="None"
                    realm="" /&gt;
              &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
        &lt;/security&gt;
  &lt;/binding&gt;
  </code></pre>