title: maxItemsInObjectGraph ignored
body: <p>I have a problem with a WCF service, which tries to serialize too much data. From the trace I get an error which says that the maximum number of elements that can be serialized or unserialized is '65536', try to increment the MaxItemsInObjectGraph quota.</p>
  
  <p>So I went and modified this value, but it is just ignored (the error is the same, with the same number). All this is server-side. I am calling the service via wget for the moment.</p>
  
  <p>My web config is like this:</p>
  
  <pre><code>&lt;system.serviceModel&gt;  
    &lt;behaviors&gt;
     &lt;serviceBehaviors&gt;
      &lt;behavior name="AlgoMap.Web.MapService.MapServiceBehavior"&gt;
         &lt;dataContractSerializer maxItemsInObjectGraph="131072" /&gt;
         &lt;serviceMetadata httpGetEnabled="true" /&gt;
         &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
      &lt;/behavior&gt;
     &lt;/serviceBehaviors&gt;
    &lt;/behaviors&gt;
    &lt;bindings&gt;
     &lt;customBinding&gt;
      &lt;binding name="customBinding0" closeTimeout="00:02:00" openTimeout="00:02:00" receiveTimeout="00:02:00"&gt;
        &lt;binaryMessageEncoding&gt;
          &lt;readerQuotas maxDepth="64" maxStringContentLength="16384"
                                  maxArrayLength="16384" maxBytesPerRead="16384"
                                  maxNameTableCharCount="16384" /&gt;
        &lt;/binaryMessageEncoding&gt;
        &lt;httpTransport /&gt;
      &lt;/binding&gt;
     &lt;/customBinding&gt;
    &lt;/bindings&gt;
    &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;
    &lt;services&gt;
     &lt;service behaviorConfiguration="AlgoMap.Web.MapService.MapServiceBehavior"
      name="AlgoMap.Web.MapService.MapService"&gt;
      &lt;endpoint address="" binding="customBinding" bindingConfiguration="customBinding0"
       contract="AlgoMap.Web.MapService.MapService" /&gt;
      &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
     &lt;/service&gt;
    &lt;/services&gt;
   &lt;/system.serviceModel&gt;
  </code></pre>
  
  <hr>
  
  <hr>
  
  <hr>
  
  <p>Version 2, not working either:</p>
  
  <pre><code> &lt;system.serviceModel&gt;  
    &lt;behaviors&gt;
  
      &lt;endpointBehaviors&gt;
        &lt;behavior name="AlgoMap.Web.MapService.MapServiceEndpointBehavior"&gt;
           &lt;dataContractSerializer maxItemsInObjectGraph="131072" /&gt;
        &lt;/behavior&gt;
      &lt;/endpointBehaviors&gt;
  
     &lt;serviceBehaviors&gt;
      &lt;behavior name="AlgoMap.Web.MapService.MapServiceBehavior"&gt;
         &lt;serviceMetadata httpGetEnabled="true" /&gt;
         &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
      &lt;/behavior&gt;
     &lt;/serviceBehaviors&gt;
    &lt;/behaviors&gt;
    &lt;bindings&gt;
     &lt;customBinding&gt;
      &lt;binding name="customBinding0" closeTimeout="00:02:00" openTimeout="00:02:00" receiveTimeout="00:02:00"&gt;
        &lt;binaryMessageEncoding&gt;
          &lt;readerQuotas maxDepth="64" maxStringContentLength="16384"
                                  maxArrayLength="16384" maxBytesPerRead="16384"
                                  maxNameTableCharCount="16384" /&gt;
        &lt;/binaryMessageEncoding&gt;
        &lt;httpTransport /&gt;
      &lt;/binding&gt;
     &lt;/customBinding&gt;
    &lt;/bindings&gt;
  
    &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;
    &lt;services&gt;
     &lt;service behaviorConfiguration="AlgoMap.Web.MapService.MapServiceBehavior"
      name="AlgoMap.Web.MapService.MapService"&gt;
       &lt;endpoint 
          address="" binding="customBinding" bindingConfiguration="customBinding0"
          contract="AlgoMap.Web.MapService.MapService" 
          behaviorConfiguration="AlgoMap.Web.MapService.MapServiceEndpointBehavior" /&gt;
      &lt;endpoint 
          address="mex" binding="mexHttpBinding" contract="IMetadataExchange"  
          behaviorConfiguration="AlgoMap.Web.MapService.MapServiceEndpointBehavior" /&gt;
     &lt;/service&gt;
    &lt;/services&gt;
   &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Can anyone help?? 
  Thanks!!</p>