-1

I am using asynchronous methods of SSH.NET C# API to manage SFTP operations. If I specify invalid remote path in BeginDownloadFile or BeginUploadFile then the operation fails and my asyncCallback is called immediately with 0 transferred bytes count. I want to get hold of exception information but it doesn't seem to be passed. I installed an error handler on SFTP connection (ErrorOccurred) but it never gets called. Any idea of how exception can be trapped when using async methods of SSH.NET?

Vagif Abilov
  • 9,835
  • 8
  • 55
  • 100

1 Answers1

-1

I've found the error: I was not using EndDownloadFile in the callback handler. Once I added it there, it threw an exception.

Vagif Abilov
  • 9,835
  • 8
  • 55
  • 100