title: Transfering a file using ftp from one server to another in different location
body: <p>I have a requirement of transferring a document file (.txt, .xls, .doc, .bmp, .jpg etc) from one server to another server. Both servers are at different locations. My main application is running on second server. And I have to deploy this functionality on the first server from where the files in any fixed folder (say D:\documents) will be transferred to second server periodically at any timer event.</p>
  
  <p>I am using a code like as follows</p>
  
  <pre><code>WebClient wc = new WebClient();
  wc.UploadFile("ftp://1.23.153.248//d://ftp.bmp", 
      @"C:\Documents and Settings\varun\Desktop\ftp.bmp");
  </code></pre>
  
  <p>I am getting the error as</p>
  
  <pre><code>unable to connect to remote server  
  </code></pre>
  
  <p>or </p>
  
  <pre><code>sometime underlying connection was closed 
  </code></pre>
  
  <p>Could you tell me what's wrong.</p>