Hi,
I am using the trial version of edtFTPnet/PRO 4.2.0. When I use the regular FTPConnection to connect to a unix box, it is very fast. If I use the SecureFTPConnection to connect to the same unix box, it is about 30 times slower than the FTPConnection.
The following is the code snippet:
SecureFTPConnection ftpCxn = new SecureFTPConnection();
ftpCxn.ServerAddress = "servername";
ftpCxn.UserName = "username";
ftpCxn.Password = "password";
ftpCxn.Protocol = FileTransferProtocol.SFTP;
ftpCxn.AuthenticationMethod = AuthenticationType.PublicKey;
ftpCxn.ServerValidation = SecureFTPServerValidationType.None;
ftpCxn.ClientPrivateKeyFile = "C:\\private.key";
ftpCxn.ServerPort = 22;
ftpCxn.Connect();
ftpCxn.ChangeWorkingDirectory("directory");
foreach (FTPFile myFile in ftpCxn.GetFileInfos())
{
Console.WriteLine("File name: {0}", myFile.Name);
}
If I loop the above code for execution 10 times, it took more than 30 seconds to finish. However for the regular FTPConnection, loop 10 time only took less than 1 second.
Does the SecureFTPConnection suppose to be slower than FTPConnection or is there something wrong with the code?