title: WCF service upload large file to ftp server
body: <p>I am developing one windows phone application which upload images zip file to <strong>ftp server</strong>. But I can't upload it. It gives an error <strong>Remote server Not found</strong></p>
  
  <p>Here is my <strong>WCF</strong> application <strong>web.config</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  
   &lt;appSettings&gt;
         &lt;add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /&gt;
  &lt;/appSettings&gt;
  &lt;system.web&gt;
  &lt;compilation debug="true" targetFramework="4.5" /&gt;
  &lt;httpRuntime targetFramework="4.5" maxRequestLength="409600" /&gt;   
  &lt;/system.web&gt;
  &lt;system.serviceModel&gt;
  &lt;bindings&gt;
    &lt;basicHttpBinding&gt;
      &lt;!--&lt;binding maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" receiveTimeout="00:10:00" closeTimeout="00:10:00"&gt;
        &lt;security mode="None" /&gt;
      &lt;/binding&gt;--&gt;
      &lt;binding closeTimeout="01:30:00" 
        openTimeout="01:30:00" receiveTimeout="01:30:00" sendTimeout="01:30:00" 
        maxBufferSize="2147483646" maxBufferPoolSize="2147483646" maxReceivedMessageSize="2147483646"&gt;
        &lt;readerQuotas maxDepth="2147483646" maxStringContentLength="2147483646" maxArrayLength="2147483646"
          maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646" /&gt; 
        &lt;security mode="None"&gt;             
        &lt;/security&gt;
      &lt;/binding&gt;    
    &lt;/basicHttpBinding&gt;    
  &lt;/bindings&gt;   
  
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior&gt;
        &lt;!-- To avoid disclosing metadata information, set the values below to false before deployment --&gt;
        &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/&gt;
        &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information --&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
   &lt;protocolMapping&gt;
      &lt;add binding="basicHttpsBinding"  scheme="https"/&gt;
   &lt;/protocolMapping&gt;    
   &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
   &lt;/system.serviceModel&gt;
   &lt;system.webServer&gt;
    &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
    &lt;!--
      To browse web app root directory during debugging, set the value below to true.
      Set to false before deployment to avoid disclosing web app folder information.
    --&gt;
   &lt;directoryBrowse enabled="true"/&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is my <strong>ServiceReferences.ClientConfig</strong></p>
  
  <pre><code>&lt;configuration&gt;
  &lt;system.serviceModel&gt;
      &lt;bindings&gt;
          &lt;basicHttpBinding&gt;
              &lt;binding name="BasicHttpBinding_IService1" maxBufferSize="2147483647" closeTimeout="01:10:00"
                      openTimeout="01:10:00" receiveTimeout="01:10:00" sendTimeout="01:10:00" maxReceivedMessageSize="2147483647"&gt;
                  &lt;security mode="None" /&gt;
              &lt;/binding&gt;
          &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
          &lt;endpoint address="http://xxx.xx.x.xxx/WebService/Service1.svc"
              binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
              contract="MyService.IService1" name="BasicHttpBinding_IService1" /&gt;
      &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have create two project one is windows phone application, second is wcf application. I am sending large <strong>byte[]</strong> array to wcf server which gives an error <strong>Remote server Notfound</strong>. It works perfectly when the <code>byte[] size</code> is small but fails when the size is large. I heard that we can send very large file to wcf service near about 4gb. Then where I was wrong? Is there any change I have to do in <strong>web.config</strong>? I have <code>hosted</code> my wcf service to <strong>IIS</strong> on local machine.</p>