Jump to content


Photo

KeyManager.LoadFile - DISP_E_MEMBERNOTFOUND


  • Please log in to reply
1 reply to this topic

#1 Broomy

Broomy
  • Members
  • 3 posts

Posted 25 July 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

#2 mb

mb

    Developer

  • Administrators
  • 11525 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 25 July 2008 - 03: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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users