title: binding and configuration for webHttpBinding in RESTful service?
body: <p>I'm new to WCF and am trying to get my head around the labyrinth of configurations the services take.  I have a rest service that can return an export of a table, which it larger than the default  <code>maxReceivedMessageSize</code>.  So I'm been trying to play with the config for this service/endpoint and I'm getting nowhere.  Below if the gist of what I'm working on, what am I missing?  I simply return List as either JSON or XML and I need to be able to return over the default threshold.</p>
  
  <pre><code>&lt;system.serviceModel&gt;
  &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;
  
  &lt;services&gt;
    &lt;!-- defin service --&gt;
    &lt;service behaviorConfiguration="EPRestBehavior" name="EPRestDNS"&gt;
      &lt;endpoint address="" 
                bindingConfiguration="ApiExportBinding"
                binding="webHttpBinding" 
                contract="IDNSRestService" /&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="EPRestBehavior"&gt;
        &lt;serviceMetadata httpGetEnabled="true"/&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  
    ...
  
  &lt;/behaviors&gt;
  &lt;bindings&gt;
    &lt;!-- Customizations for REST service --&gt;
    &lt;webHttpBinding&gt;
      &lt;binding name="ApiExportBinding" maxReceivedMessageSize="10485760"
                      maxBufferPoolSize="10485760" maxBufferSize="10485760" closeTimeout="00:03:00"
                      openTimeout="00:03:00" receiveTimeout="00:10:00" sendTimeout="00:03:00"&gt;
        &lt;readerQuotas maxDepth="32" maxStringContentLength="10485760"
                        maxArrayLength="10485760" maxBytesPerRead="10485760" /&gt;
        &lt;security mode="None" /&gt;
      &lt;/binding&gt;
    &lt;/webHttpBinding&gt;
  &lt;/bindings&gt;
  
  &lt;standardEndpoints&gt;
    &lt;webHttpEndpoint&gt;
      &lt;standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" /&gt;
    &lt;/webHttpEndpoint&gt;
  &lt;/standardEndpoints&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>UPDATE 1</strong>
  I've removed all of that config and tried something simper with the existing webHttpEndpoint section:</p>
  
  <pre><code>&lt;standardEndpoints&gt;
    &lt;webHttpEndpoint&gt;
      &lt;standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" maxReceivedMessageSize="1000000000" /&gt;
    &lt;/webHttpEndpoint&gt;
  &lt;/standardEndpoints&gt;
  </code></pre>
  
  <p>with the same results.  <code>HTTP/1.1 502 Connection reset by peer</code></p>