KeyManager.LoadFile - DISP_E_MEMBERNOTFOUND

This forum is not monitored by the SmartFTP staff. If you have a license please contact technical support by email.
Post Reply
broomm
Posts: 3
Joined: Tue Jul 22, 2008 1:53 pm

KeyManager.LoadFile - DISP_E_MEMBERNOTFOUND

Post by broomm » Fri Jul 25, 2008 12:32 pm

I'm trying to get our private key setup for an sftp connection and this works fine using the library sdk but when trying to use the SmartFTP Application object / pro scripting I get a [DISP_E_MEMBERNOTFOUND] exception generated in the line highlighted below.

objFTP = CreateObject("sfFTPLib.SFTPConnection")

objFTP.Host = My.Settings.SFTPAddress
objFTP.Port = 22
objFTP.Username = My.Settings.SFTPUsername

' load our private key
Dim keymanager As Object = CreateObject("sfFTPLib.KeyManager")
objFTP.PrivateKey = keymanager.LoadFile("C:\sftp-keys\smh-vrs.ppk", "mypassword")

Am I doing something wrong? Your help would be appreciated.

Many Thanks
Mark

mb
Posts: 12030
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: KeyManager.LoadFile - DISP_E_MEMBERNOTFOUND

Post by mb » Fri Jul 25, 2008 3:26 pm

What if you declare the keymanger as:
Dim keymanager As sfFTPLib.KeyManager

Please consider purchasing a licenes for the FTP Library if you require support for scripting since the Pro Edition does not offer support for scripting.

Thank you
Regards,
SmartFTP
Last edited by mb on Fri Jul 25, 2008 4:46 pm, edited 1 time in total.

Post Reply