title: Need help with: "The remote server returned an unexpected response: (400) Bad Request."
body: <p>I have a WCF service that has been working fine for some time now, and I decided to add something to it.  All of the old stuff works just as it should and the new stuff works for smaller transfers from the client to the host.  However, it blows up with a "(400) Bad Request" when the client tries to send large strings to the host.  Without changing anything, the host can send items that are just as large or larger to the client with no problem.</p>
  
  <p>I've looked around on here and other sites, and while I've found people with the same problem, their solutions (increasing app.config sizes and lengths) have not yielded any successes for my problem.</p>
  
  <p>Web.config</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;behaviors&gt;
          &lt;serviceBehaviors&gt;
              &lt;behavior&gt;
                  &lt;serviceMetadata httpGetEnabled="true"/&gt;
                  &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
              &lt;/behavior&gt;
              &lt;behavior  name="Throttled"&gt;
                  &lt;serviceThrottling
                      maxConcurrentCalls="1000"
                      maxConcurrentSessions="1000"
                      maxConcurrentInstances="1000" /&gt;
                  &lt;serviceMetadata
                      httpGetEnabled="true"
                      httpGetUrl="" /&gt;
              &lt;/behavior&gt;
          &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true"/&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>app.config</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;bindings&gt;
          &lt;basicHttpBinding&gt;
              &lt;binding name="BasicHttpBinding_IService" closeTimeout="00:01:00"
               openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
               allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
               maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
               messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
               useDefaultWebProxy="true"&gt;
                  &lt;readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                   maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
                  &lt;security mode="None"&gt;
                      &lt;transport clientCredentialType="None" proxyCredentialType="None"
                       realm="" /&gt;
                      &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
          &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
          &lt;endpoint address="---HostingSiteURL---/Service.svc"
           binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService"
           contract="SimSyncServiceReference.IService" name="BasicHttpBinding_IService" /&gt;
      &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>