WeOnlyDo.Exceptions.SFTP.InvalidStateException: In (wodSFTP / wodSFTP.NET / wodSFTPdll)
I'm receiving WeOnlyDo.Exceptions.SFTP.InvalidStateException: Invalid state. Not connected. error at sftp1.GetFile method using the code below for sftp.
Could you please let me know what I'm doing wrong ?
=====================================================================
WeOnlyDo.Client.SFTP sftp1 = new WeOnlyDo.Client.SFTP();
WeOnlyDo.Security.Cryptography.KeyManager key1 = new WeOnlyDo.Security.Cryptography.KeyManager();
sftp1.LicenseKey = my license key ;
key1.Load( c:abc );
sftp1.Authentication = WeOnlyDo.Client.SFTP.Authentications.PublicKey;
sftp1.Hostname = host_name ;
sftp1.Login = login_name ;
sftp1.PrivateKey = key1.PrivateKey(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey);
Console.Writeline( Load key ok );
sftp1.Connect();
Console.Writeline( Connect ok );
sftp1.RemotePath = /data ;
Console.Writeline( RemotePath ok );
sftp1.GetFile(LocalPath, filename);
sftp1.Disconnect();
key1.Dispose();
sftp1.Dispose();
Complete thread:
- WeOnlyDo.Exceptions.SFTP.InvalidStateException: In - Puja Mallik, 2008-03-25, 20:36
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 20:40
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 20:54
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 20:55
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 21:01
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 22:31
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 22:39
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-26, 19:56
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - woddrazen, 2008-03-26, 20:02
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-26, 20:10
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - woddrazen, 2008-03-26, 20:14
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-26, 20:10
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - woddrazen, 2008-03-26, 20:02
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-26, 19:56
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 22:39
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 22:31
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 21:01
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 20:55
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - Puja Mallik, 2008-03-25, 20:54
- Re: WeOnlyDo.Exceptions.SFTP.InvalidStateException - wodDamir, 2008-03-25, 20:40