title: How to increase MaxStringContentLength on the server side for binary Http binding
body: <p>I recently converted some Silverlight 3 WCF services to use the new binary http bindings.  Long strings are often sent over to the server for deserialization in these services and I previously used  to ensure the data could be read properly.  However, with the new binding I can't find the correct place to add the  element:</p>
  
  <pre><code>      &lt;customBinding&gt;
          &lt;binding name="binaryHttpBinding"&gt;
            &lt;binaryMessageEncoding maxReadPoolSize="2147483647" maxSessionSize="2147483647" maxWritePoolSize="2147483647"/&gt;
            &lt;httpTransport maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/&gt;
          &lt;/binding&gt;
        &lt;/customBinding&gt;
  </code></pre>
  
  <p>Here's one attempt:</p>
  
  <pre><code>      &lt;customBinding&gt;
          &lt;binding name="binaryHttpBinding"&gt;
            &lt;binaryMessageEncoding maxReadPoolSize="2147483647" maxSessionSize="2147483647" maxWritePoolSize="2147483647"/&gt;
            &lt;httpTransport maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/&gt;
            &lt;textMessageEncoding&gt;
              &lt;readerQuotas maxDepth="32" maxStringContentLength="5242880"
              maxArrayLength="200000" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
            &lt;/textMessageEncoding&gt;
          &lt;/binding&gt;
        &lt;/customBinding&gt;
  </code></pre>
  
  <p>That caused other problems - it doesn't seem like a good idea to have a binary encoding and a textMessageEncoding in the same binding.  So using only the binary encoding, how can I increase the reader quotas to allow deserialization of large strings?</p>