Comments: ** Comment from web user: scottowa **
Hello Gert,
Thanks for the library it is really good.
It seems like I have hit the same problem - I am fine reading small files (40Kb) but when I went to a slightly larger file(140Kb) - I hit the same disconnect error.
I am using almost exactly the same code as Eric and I can download the same file using Filezilla without any problems as well.
The stack trace is:
at Renci.SshNet.Sftp.SubsystemSession.WaitOnHandle(WaitHandle waitHandle, TimeSpan operationTimeout)
at Renci.SshNet.Sftp.SftpSession.RequestRead(Byte[] handle, UInt64 offset, UInt32 length)
at Renci.SshNet.SftpClient.InternalDownloadFile(String path, Stream output, SftpDownloadAsyncResult asyncResult, Action`1 downloadCallback)
at Renci.SshNet.SftpClient.DownloadFile(String path, Stream output, Action`1 downloadCallback)
I have tried tinkering with:
sftp.BufferSize = 1024 * 256 - 50;
sftp.SendKeepAlive();
sftp.OperationTimeout = TimeSpan.FromSeconds(3600);
sftp.ConnectionInfo.Timeout = TimeSpan.FromSeconds(3600);
Nothing seems to help.
Many Thanks,
Adrian