Open paritoshnagar2016 opened 4 months ago
I think that message "Failed to open local file" is coming from your server, so you might start there if you have access.
You might be able to get some more information from the client-side but unfortunately it's not easy with the current version. I think basically you are receiving a SftpStatusResponse
defined here:
https://github.com/sshnet/SSH.NET/blob/develop/src/Renci.SshNet/Sftp/Responses/SftpStatusResponse.cs
The ErrorMessage
property corresponds to your "Failed to open local file message" message. The StatusCode
property might contain more pertinent information. Unfortunately all this stuff is internal currently, but you could probably access it with a local build of the library and some crafty debugging.
I have been seeing below error while downloading file from SFTP and I am unsure why it throw below exception, what does that signifies?
Renci.SshNet.Common.SshException: Failed to open local file at Renci.SshNet.Common.AsyncResult.EndInvoke() at Renci.SshNet.Sftp.SftpSession.EndOpen(SftpOpenAsyncResult asyncResult) at Renci.SshNet.ServiceFactory.CreateSftpFileReader(String fileName, ISftpSession sftpSession, UInt32 bufferSize) at Renci.SshNet.SftpClient.InternalDownloadFile(String path, Stream output, SftpDownloadAsyncResult asyncResult, Action`1 downloadCallback)