I have the following code. It has worked beautifully for years using the sFTP libraries version 5.0.
We have recent upgraded to the latest 6.8 and the stream is unreadable. The stream is retrieved from the sftp server and it exists..but it throws an error an an unreadable stream.
Simply swapping the references back to the 5.0 libraries allows the stream to be readable.
Is there a difference in the stream returned by the 'GetDownloadStream' method.
var stream = sftpClient.GetDownloadStream(Normalize(remoteFilename));
if (stream.Length <= 100000000)//if less than 100mb