Facing issues using PutFIleasync

0 votes
asked Apr 26 by varshamotwani (120 points)

Hi,
I am trying to upload a file usinf memory stream.
I amd calling below function and passing memory stream and filename.
Bleow code executes OK without any exception, but file is not created.Am I missing something.

Dim asyncResult = ssh.PutFileAsync(ms, Filename)

asyncResult.Wait()
Applies to: Rebex SFTP

1 Answer

0 votes
answered Apr 26 by Lukas Matyska (47,230 points)

The file is not created or it has zero length?

If zero length file is created, please ensure that ms.Position = 0 first.

If the file is not created at all, please post here or send to support@rebex.net debug communication log. It can be created like this:

ssh.LogWriter = New Rebex.FileLogWriter("c:\temp\ssh.log", Rebex.LogLevel.Debug)
...