Hangs on putFile - WeOnlyDo Discussion board

Hangs on putFile (wodFtpDLX / wodFtpDLX.NET)

by Vlad, Thursday, April 27, 2017, 19:51 (2767 days ago) @ Jasmine

I'm using SSH/SFTP. It doesn't send an errors. It just sits on the putFile line forever.

init(......)
{
wod.ConnectedEvent += new WeOnlyDo.Client.FtpDLX.ConnectedDelegate(wodFTPDLX_ConnectEvent);
wod.DoneEvent += new WeOnlyDo.Client.FtpDLX.DoneDelegate(wodFTPDLX_DoneEvent);
wod.ProgressEvent += new WeOnlyDo.Client.FtpDLX.ProgressDelegate(wodFtpDLX_ProgressEvent);

keyPassword = _keyPassword;
username = _userName;
host = _host;
licenseKey = _licenseKey;
keyPath = _keyPath;
sourceFilePath = _sourceFile;
remoteFolderPath = _remoteFolderPath;
}

connect(...)
{
WeOnlyDo.Security.Cryptography.KeyManager keyManager = new WeOnlyDo.Security.Cryptography.KeyManager();
keyManager.Load(keyPath, keyPassword);

//Set authentication to public key type.
wodSFTP.Authentication = WeOnlyDo.Client.Authentications.PublicKey;

//Connect private key from wodKeyManager.NET to wodSFTP.NET.
wod.Blocking = true; //Use synchronous connections
wod.Login = username;
wod.Hostname = host;
wod.Protocol = WeOnlyDo.Client.Protocols.SFTP;
wod.LicenseKey = licenseKey;
wod.Port = 22;
wod.PrivateKey = keyManager.ToXmlString(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey, true);
wodSFTP.Connect();
}

public void wodFTPDLX_ConnectEvent(object Sender, WeOnlyDo.Client.FtpConnectedArgs Args)
{
wod.PutFile(sourceFilePath, remoteFolderPath);
}

Hi Vlad,

can you please give us more details? What component exactly are you using? Do you get any errors?

If you try our sample apps that are distributed with the component, to transfer same file, does it work?

Jasmine.


Complete thread: