ComponentPro UltimateFtp

      Revert to plain/unencrypted communication

      Language Filter: AllSend comments on this topic to ComponentPro

      A secured connection can be reverted back to unsecure/plain one. To do so, call the ClearCommandChannel method.

      using System;
      using System.Collections.Generic;
      using System.Text;
      using ComponentPro;
      using ComponentPro.Net;
      
      ...
      
      // Create a new class instance.
      Ftp client = new Ftp();
      
      // Connect to the FTP server asynchronously.
      client.Connect("myserver");
      
      // Or you can specify the FTP port with 
      // client.Connect("myserver", 21); 
       
      // Authenticate the user.
      client.Authenticate("userName", "password");
      
      // ... 
       
      // Use the ClearCommandChannel to revert back to unencrypted FTP control connection  
      // after logging in (data connections can stay encrypted after this), enabling the  
      // firewall to work again in exchange for a degree of security. 
      // From now on, all data sending to the server will not be protected.
      client.ClearCommandChannel();
      
      // ... 
       
      // Disconnect.
      client.Disconnect();