Hi there,
I am currently using a trial version of edtFTPnet. As part of my testing, I am downloading a 16MB file from an sFTP site. Using FileZilla, the transfer is taking approximately 12 seconds, but using the DownloadFile method, it is taking approximately 4 minutes.
Here is the code I'm using to download the file:
public void DownloadFile()
        {
            String remoteFolder = "/FOLDERNAME/";
            String localFolder = "c:\\tmp\\";
            String sFtpSite = "SFTPSITE";
            String ftpUsername = "USERNAME";
            String ftpPassword = "PASSWORD";
            String filename = "FILENAME";
            String remoteFile = string.Concat(remoteFolder, filename);
            String localFile = String.Concat(localFolder, filename);
            SecureFTPConnection.LogLevel = EnterpriseDT.Util.Debug.LogLevel.All;
            SecureFTPConnection.LogToConsole = true;
            SecureFTPConnection.LogFile = "c:\\tmp\\log.txt";
            SecureFTPConnection sftp = new SecureFTPConnection();
            sftp.ServerAddress = sFtpSite;
            sftp.UserName = ftpUsername;
            sftp.Password = ftpPassword;
            sftp.ServerPort = 22;
            sftp.ServerValidation = EnterpriseDT.Net.Ftp.SecureFTPServerValidationType.None;
            sftp.Protocol = FileTransferProtocol.SFTP;
            sftp.TransferNotifyInterval = 1024 * 1024;
            sftp.BytesTransferred += sftp_BytesTransferred;
            sftp.Connect();
            Debug.Print(DateTime.Now.ToString("h:mm:ss>") + " About to start download");
            sftp.DownloadFile(localFile, remoteFile);
            Debug.Print(DateTime.Now.ToString("h:mm:ss>") + " Download completed");
        }
        void sftp_BytesTransferred(object sender, BytesTransferredEventArgs e)
        {
            Debug.Print(DateTime.Now.ToString("h:mm:ss> ") + e.ByteCount.ToString() + " bytes downloaded");
        }
Here is the output I'm seeing:
10:08:53> About to start download
10:09:09> 1074300 bytes downloaded
10:09:27> 2148600 bytes downloaded
10:09:43> 3222900 bytes downloaded
10:09:57> 4297200 bytes downloaded
10:10:11> 5371500 bytes downloaded
10:10:25> 6445800 bytes downloaded
10:10:39> 7520100 bytes downloaded
10:10:54> 8594400 bytes downloaded
10:11:07> 9668700 bytes downloaded
10:11:25> 10743000 bytes downloaded
10:11:41> 11817300 bytes downloaded
10:11:57> 12891600 bytes downloaded
10:12:12> 13965900 bytes downloaded
10:12:29> 15040200 bytes downloaded
10:12:46> 16114500 bytes downloaded
10:12:48> Download completed
Here is the log of the same download in FileZilla:
Status: Connected to SFTPSITE
Status: Starting download of /FOLDERNAME/FILENAME
Status: remote:/FOLDERNAME/FILENAME => local:C:\tmp\FILENAME
Status: File transfer successful, transferred 16,164,549 bytes in 12 seconds
Logfile for download
Can you suggest why the download performance might be so different?
Thanks and regards,
Dermot