0 votes
by (160 points)


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.


Applies to: Rebex SFTP

1 Answer

+1 vote
by (146k points)
selected by
Best answer


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).

by (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.