title: Transferring 5 megabytes file using wcf
body: <p>I am trying to use wcf for transferring a file larger then 5 mega.(i cant use streeaming for now it demands major changes to running code).  </p>
  
  <p>I configured the server and the client to the maximum settings and still i get the exception of maximum length.  </p>
  
  <p>Here is my server web.config:   </p>
  
  <pre><code>&lt;system.serviceModel&gt;
  &lt;diagnostics&gt;
    &lt;messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="true"
      logMessagesAtTransportLevel="true" /&gt;
  &lt;/diagnostics&gt;
  &lt;services&gt;
      &lt;service name="xxx.xxx.Service"&gt;
          &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="xxx"
              contract="xxx.xxx.IService" /&gt;
      &lt;/service&gt;
  &lt;/services&gt;
  &lt;bindings&gt;
      &lt;basicHttpBinding&gt;
          &lt;binding name="b2bservice" 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"
              transferMode="Buffered" useDefaultWebProxy="true"&gt;
              &lt;readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
                  maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt;
              &lt;security mode="None" /&gt;
          &lt;/binding&gt;
      &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;client /&gt;
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name=""&gt;
        &lt;serviceMetadata httpGetEnabled="true" /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true" /&gt;
  </code></pre>
  
  <p>    </p>
  
  <p>And here is the client 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="2147483647" maxStringContentLength="2147483647"
          maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&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="xxx"
      binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService"
      contract="BService.IBService" name="BasicHttpBinding_IService" /&gt;
  &lt;/client&gt;
  </code></pre>
  
  <p></p>
  
  <p>My trace Logging is:  </p>
  
  <blockquote>
    <p>Maximum request length exceeded.<br>
    System.ServiceModel.CommunicationException, System.ServiceModel,
    Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`</p>
  </blockquote>
  
  <p>Any thoughts?</p>