Method Rebex.Net.Sftp.GetFile(string, Stream) throws "Internal file read error."

0 votes
asked Oct 17 by Sebastian Daser (160 points)

Hi,

I am occasionally receiving an Exception with Message "Internal file read error." when calling method Rebex.Net.Sftp.GetFile(string, Stream).

Does this message originate from the SFTP server or is it generated by the Rebex library?

Any tips how I could analyze the root cause would be appreciated.

Thanks!

Applies to: Rebex SFTP

1 Answer

+1 vote
answered Oct 17 by Lukas Pokorny (95,290 points)
selected Oct 18 by Sebastian Daser
 
Best answer

Hi,

This error most likely comes from the SFTP server and indicates a server-side issue while reading from a file. Server-side error trigger an SftpException with a Status property set to SftpExceptionStatus.ProtocolError. Check this to distinguish server-side errors from other errors.

If this is indeed a server-side issue, it should be analyzed at the server-side - the server log should contain additional information. The client only gets the error message and error code (available through SftpExceptionStatus.Code).

commented Oct 18 by Sebastian Daser (160 points)
Thanks for your quick response, Lukas!
With help of your detailed information I will now improve the error handling of my process and continue analyzing the issue.
...