0

I am downloading files from a client's SFTP. When I do it from Filezilla it always succeeds in the standard way.

On the other side, when I do it from our app, that uses Tamir SharpSSH library for SFTP communication, periods constantly emerge when our all download attempts for a file fail.

I know the app works as that code has not been changes for several months and it worked much more often then it did not, but the periods keep reemerging when for the whole day or more all file downloads fail only for the app.

The exception I get is Tamir.SharpSsh.jsch.SftpException . Obviously not very helpful.

My guess is the client is doing modifications on their side, or changing permissions, as their side is not live yet, but with the exception message I do not know.

Does anybody has some suggestion? Where could I look for the solution? What should I test/try?

Thank you for the time!

Срба
  • 463
  • 3
  • 17
  • 1
    Stacktrace? No exception message? – Martin Prikryl Jul 07 '15 at 12:09
  • It did help. SharpSSH library has a strange way or processing exceptions. It pretty often sets the standard exception message to "Tamir.SharpSsh.jsch.SftpException" and InnerException is null, but the custom exception has additional properties with the real message. I have got the real message. Thank you – Срба Jul 07 '15 at 12:26
  • Consider posting your solution as an answer or deleting the question. – Martin Prikryl Jul 07 '15 at 12:35

1 Answers1

1

The real message was 'No such file'. The reason was, a slash has been omitted for the root folder path, in one of our config files. When you open the exception variable in VS Watch you will see all info properties from standard exception are null or simply set to 'Tamir.SharpSsh.jsch.SftpException'.

But, an additional property was apparently added to Tamir.SharpSsh.jsch.SftpException class - "message" and that is where the real message is stored, while Exception.Message is pretty often set to just "Tamir.SharpSsh.jsch.SftpException" . The issue is the additional property is private and is only visible by VS Watch or similar.

Since our exception propagation mechanism is based on logging Exception.Message I was most of the time getting "Tamir.SharpSsh.jsch.SftpException"

Срба
  • 463
  • 3
  • 17