title: The remote server returned an error: (413) Request Entity Too Large
body: <p>Please do NOT delete this message as a duplicate!!</p>
  
  <p>I am writing a WCF service that allows for XML files to be uploaded so that they can be imported into the database. However I am receiving the above error when I upload a file above the 64k default.</p>
  
  <p>I have read through all the questions already posted on here about this problem and implemented them but still am facing the same issue.</p>
  
  <p>I have increased all the binding values in my config file (for both the client and server) to accept the maximum size of 2GB. </p>
  
  <pre><code>
  
      &lt;binding name="BasicHttpBinding_BailiffServices"
                       maxBufferSize="2147483647"
                       maxBufferPoolSize="2147483647"
                       maxReceivedMessageSize="2147483647"&gt;
                &lt;readerQuotas maxDepth="2147483647" 
                              maxStringContentLength="2147483647"
                              maxArrayLength="2147483647" 
                              maxBytesPerRead="2147483647"
                              maxNameTableCharCount="2147483647" /&gt;
                &ltsecurity mode="None" /&gt;
  
  </code></pre>
  
  <p>
  Here are the WCF services that use this binding.</p>
  
  <pre><code>
  
      &lt;services&gt;
            &lt;service name="ClientService.ClientService"&gt;
              &lt;endpoint address="http://subversion/BusinessTier.Services.ClientService.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_BailiffServices"
                name="BasicHttpBinding_IClient" contract="ClientService.IClient" /&gt;
            &lt;/service>
            &lt;service name="DebtorService.DebtorService"&gt;
              &lt;endpoint address="http://subversion/BusinessTier.Services.DebtorService.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_BailiffServices"
                name="BasicHttpBinding_IDebtor" contract="DebtorService.IDebtor" /&gt;
            &lt;/service&gt;
          &lt;/services&gt;
  
  </code></pre>
  
  <p>I have also added settings to the config to ensure that IIS is also able to handle large files. </p>
  
  <pre><code>
  
      &lt;system.webServer&gt;
          &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
          &lt;security&gt;
            &lt;requestFiltering allowDoubleEscaping="true"&gt;
              &lt;requestLimits maxAllowedContentLength="2147483647"/&gt;
              &lt;fileExtensions allowUnlisted="true"/&gt;
              &lt;verbs allowUnlisted="true"/&gt;
            &lt;/requestFiltering&gt;
          &lt;/security&gt;
        &lt;/system.webServer&gt;
  
  </code></pre>
  
  <p>
  As far as I can see I have amended all the necessary settings to allow my WCF service to accept large files, but none of them have so far worked.
  </p>
  
  <p>Any suggestions would be greatly appreciated.</p>