title: The remote server returned an error: (413) Request Entity Too Large + WCF
body: <p>May be this question is a duplicate. I have a WCF upload service through which the client uploads a particular file to the server. </p>
  
  <p>I could successfully send files of size 12MB through the service.</p>
  
  <p>Now I have integrated a self certified SSL certificate to the WCF Service. The same application which was working fine without SSL now returns an error saying Remote server returned an error (413) request entity too large.</p>
  
  <p>how do I fix this error is this something to do with SSL ?</p>
  
  <p>where am I going wrong.</p>
  
  <pre><code>&lt;system.serviceModel&gt;
  
  &lt;bindings&gt;
    &lt;basicHttpBinding&gt;
      &lt;binding name="customHttpBinding" openTimeout="00:10:00" sendTimeout="00:10:00"
       maxReceivedMessageSize="10067108864"
        messageEncoding="Mtom" transferMode="Streamed"&gt;          
        &lt;security mode="Transport"&gt;
          &lt;transport clientCredentialType="Certificate" /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="customServiceBehavior"&gt;
        &lt;serviceMetadata httpsGetEnabled="true"/&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
  
        &lt;serviceCredentials&gt;
          &lt;clientCertificate&gt;
            &lt;authentication certificateValidationMode="PeerOrChainTrust" trustedStoreLocation="LocalMachine"/&gt;
          &lt;/clientCertificate&gt;
        &lt;/serviceCredentials&gt;
  
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  
  &lt;services&gt;
    &lt;service behaviorConfiguration="customServiceBehavior" name="FileTransferService"&gt;
      &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="customHttpBinding"
        contract="IFileTransferService" /&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  </code></pre>
  
  <p></p>
  
  <p>thanks</p>