title: WCF: The remote server returned an error: (413) Request Entity Too Large
body: <p>I have a wcf service</p>
  <p>there is a method which gets base64 string to upload a file my file's size 100kb it may be larger in time</p>
  <p>i got the error message: The remote server returned an error: (413) Request Entity Too Large
  while try to get HttpWebResponse</p>
  <p>this is my wcf service web.config</p>
  <pre><code>&lt;system.serviceModel&gt;
  &lt;bindings&gt;
    
    &lt;webHttpBinding&gt;
      
      &lt;binding name=&quot;webHttpTransportSecurity&quot; allowCookies=&quot;false&quot; maxReceivedMessageSize=&quot;104857600&quot;&gt;
        &lt;readerQuotas maxDepth=&quot;2147483647&quot; maxStringContentLength=&quot;2147483647&quot; maxArrayLength=&quot;2147483647&quot;
         maxBytesPerRead=&quot;2147483647&quot; /&gt;
        &lt;security mode=&quot;Transport&quot;&gt;
          &lt;transport clientCredentialType=&quot;None&quot; /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/webHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;services&gt;
    &lt;service name=&quot;FHServices.FHSmartService&quot; behaviorConfiguration=&quot;ServiceBehaviour&quot;&gt;
      
      &lt;endpoint address=&quot;&quot; binding=&quot;webHttpBinding&quot; contract=&quot;FieldHoundServices.IFHSmartService&quot; behaviorConfiguration=&quot;web&quot;&gt;
      &lt;/endpoint&gt;
      &lt;host&gt;
        &lt;baseAddresses&gt;
          &lt;add baseAddress=&quot;http://localhost/FHServices/FHSmartService.svc/&quot; /&gt;
        &lt;/baseAddresses&gt;
      &lt;/host&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name=&quot;ServiceBehaviour&quot;&gt;
        &lt;serviceMetadata httpGetEnabled=&quot;true&quot; httpsGetEnabled=&quot;true&quot; /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults=&quot;true&quot; /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
    &lt;endpointBehaviors&gt;
      &lt;behavior name=&quot;web&quot;&gt;
        &lt;webHttp /&gt;
      &lt;/behavior&gt;
    &lt;/endpointBehaviors&gt;
  &lt;/behaviors&gt;
   &lt;serviceHostingEnvironment aspNetCompatibilityEnabled=&quot;true&quot; multipleSiteBindingsEnabled=&quot;true&quot; /&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  <p>what is my mistake?</p>
  <hr />
  <h3>solved</h3>
  <p>i found my mistake
  i remove these codes</p>
  <pre><code>&lt;security mode=&quot;Transport&quot;&gt;
      &lt;transport clientCredentialType=&quot;None&quot; /&gt;
    &lt;/security&gt;
  </code></pre>
  <p>i think transport mode for https and we have no ssl so we dont need transport mode. anyway after i remove it, everything seems ok now</p>