title: Unable to set maxReceivedMessageSize through web.config
body: <p>I have now investigated the 400 - BadRequest code for the last two hours.
  A lot of sugestions goes towards ensuring the bindingConfiguration attribute is set correctly, and in my case, it is.</p>
  
  <p>Now, I need YOUR help before destroying the building i am in :-)</p>
  
  <p>I run a WCF RestFull service (very lightweight, using this resource for inspiration: <a href="http://msdn.microsoft.com/en-us/magazine/dd315413.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/magazine/dd315413.aspx</a>) which (for now) accepts an XmlElement (POX) provided through the POST verb.</p>
  
  <p>I am currently ONLY using Fiddler's request builder before implementing a true client (as this is mixed environments).</p>
  
  <p>When I do this for XML smaller than 65K, it works fine - larger, it throws this exception: 
  The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.</p>
  
  <p>Here is my web.config file (which I even included the client-tag for (desperate times!)):</p>
  
  <pre><code>&lt;system.web&gt;
      &lt;httpRuntime maxRequestLength="1500000" executionTimeout="180"/&gt;
    &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
      &lt;diagnostics&gt;
        &lt;messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" /&gt;
      &lt;/diagnostics&gt;
      &lt;bindings&gt;
        &lt;webHttpBinding&gt;
          &lt;binding name="WebHttpBinding" maxReceivedMessageSize="1500000" maxBufferPoolSize="1500000" maxBufferSize="1500000" closeTimeout="00:03:00" openTimeout="00:03:00" receiveTimeout="00:10:00" sendTimeout="00:03:00"&gt;
            &lt;readerQuotas maxStringContentLength="1500000" maxArrayLength="1500000" maxBytesPerRead="1500000" /&gt;
            &lt;security mode="None"/&gt;
          &lt;/binding&gt;
        &lt;/webHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
        &lt;endpoint address="" binding="webHttpBinding" bindingConfiguration="WebHttpBinding" contract="Commerce.ICatalogue"/&gt;
      &lt;/client&gt;
      &lt;services&gt;
        &lt;service behaviorConfiguration="ServiceBehavior" name="Catalogue"&gt;
          &lt;endpoint address="" 
                    behaviorConfiguration="RestFull" 
                    binding="webHttpBinding"
                    bindingConfiguration="WebHttpBinding" 
                    contract="Commerce.ICatalogue" /&gt;
          &lt;!-- endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" / --&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="RestFull"&gt;
            &lt;webHttp/&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="ServiceBehavior"&gt;
            &lt;serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"/&gt;
            &lt;serviceMetadata httpGetEnabled="true"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Thanks in advance for any help leading to succesfull call with >65K XML ;-)</p>