Ejemplo n.º 1
0
 //hack[Test]
 public void FTPS()
 {
     try
     {
         var settings = new FTPConnection.SettingsData
         {
             RemoteHost = "192.168.0.150",
             RemotePort = 21,
             UserName   = "******",
             Password   = "******",
             UseSSL     = false
         };
         using (var ftp = new FTPConnection())
         {
             ftp.TraceMessage += (s, a) => { System.Diagnostics.Debug.Write(string.Format(s, a)); };
             ftp.Login(settings);
             ftp.AsciiMode = true;
             ftp.Upload(@"D:\deleteme\test.html");
             ftp.Close();
         }
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine("Caught Error :" + e.Message);
     }
 }