title: Setting MaxReceivedMessageSize in the client of a wcf rest service
body: <p>I have a rest WCF service to which I connect using a console application. The console app downloads a file. Small files work fine. For larger files I get the error below:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>This is my config file on the client side console app. </p>
  
  <pre><code>&lt;configuration&gt;     
  &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;webHttpBinding&gt;
          &lt;binding maxReceivedMessageSize="2000000"
                    maxBufferSize="2000000"&gt;
            &lt;readerQuotas maxStringContentLength="2000000"/&gt;
          &lt;/binding&gt;
        &lt;/webHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>The WCF config is as follows:</p>
  
  <pre><code>    &lt;webHttpBinding&gt;
          &lt;binding name="MyTestBinding" maxReceivedMessageSize="10000000" maxBufferPoolSize="10000000" maxBufferSize="10000000" transferMode="Buffered"&gt;
              &lt;readerQuotas maxDepth="10000000" maxArrayLength="10000000" maxBytesPerRead="10000000" maxNameTableCharCount="10000000" maxStringContentLength="10000000" /&gt;
              &lt;security mode="Transport"&gt;
                  &lt;transport clientCredentialType="None" /&gt;
              &lt;/security&gt;
          &lt;/binding&gt;
      &lt;/webHttpBinding&gt;
  </code></pre>
  
  <p>I am using WebChannelFactory to connect to the service. What could be wrong?</p>