Transfer the File minimum 49,152 bytes using SFTP

Aug 30, 2013 at 3:55 PM
I Want to transfer the file using FTP my file size is high can you please provide me a solution for this?

When i use your SFTPdll i got Timeout error. Please help on this
Sep 10, 2013 at 7:58 PM
I don't know why, but i found the default buffer size of the client connection is 16k, and when the upload starts, with files over 16kb, the client waits to the buffer will be free again, but this never occur and the timeout is throwing.

To solve that, I'm setting the buffer size to a minor value and it's works fine:
                AuthenticationMethod am = new PasswordAuthenticationMethod(tbUser.Text, tbPsw.Text);
                ConnectionInfo ci = new ConnectionInfo(tbHost.Text, int.Parse(tbPort.Text), tbUser.Text, new AuthenticationMethod[] { am });                                                

                _sftpClient = new SftpClient(ci);
                _sftpClient.BufferSize = 1024 * 8 - 50;

Hope it helps