title: Save file to ftp server
body: <p>I'm creating a file uploader in asp.net and c#. 
  I just wanted to save that uploaded files to ftp server directly. 
  Is it possible? And if it is possible, how can I set that ftp server authentication information. </p>
  
  <p>(127.0.0.1 is just an example. I couldn't write my real ip. And I have to get files using HTTP protocol. Some of our clients ISPs don't support ftp. That's the main problem.)</p>
  
  <pre><code>protected void submit_button_Click(object sender, EventArgs e)
      {
          string filename = Path.GetFileName(upload_file.FileName);
          string fileExt = Path.GetExtension(upload_file.FileName);
  
          if (fileExt == ".csv")
          {
              string folder = Server.MapPath("ftp://127.0.0.1/uploads/");
                  upload_file.SaveAs(folder + "/" + filename);
                  ltr.Text = "Successful.";
          }
          else
          {
              upload_file.BorderColor = System.Drawing.Color.Red;
              ltr.Text = "File type must be .csv.";
          }
      }
  </code></pre>