WOD SFTP - WeOnlyDo Discussion board

WOD SFTP (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Gary Wong, Tuesday, July 07, 2009, 04:30 (5619 days ago)

I would like to ask anyone can tell what cause this exception when setting up the parameters for the SFTP connection. Thanks in advance

System.NullReferenceException: Object reference not set to an instance of an object.
at OpenSSL_add_all_algorithms()
at WeOnlyDo.Security.Cryptography.KeyManager..ctor()

Re: WOD SFTP

by wodDamir, Tuesday, July 07, 2009, 08:40 (5619 days ago) @ Gary Wong

Hi Gary,

We never had reports of such errors. Can you perhaps provide us more details?

What environment is this occuring in?

From the exception I see that this occurs when initializing wodKeyManager.Net. Can you show me the part of code where you declare and initialize it?

Regards,
Damba

Re: WOD SFTP

by Gary, Tuesday, July 07, 2009, 08:53 (5619 days ago) @ wodDamir

Hi Damba,

Pleas find the code below that initialize the key manager

mySFTP = New WeOnlyDo.Client.SFTP
mySFTPEventErrArg = Nothing
Try
With mySFTP
.Hostname = mConfig.FTP_Server
.Login = mConfig.FTP_User
km = New WeOnlyDo.Security.Cryptography.KeyManager
type = km.Load(mConfig.RSA_Key_Path)
.PrivateKey = km.PrivateKey(type)
.Authentication = WeOnlyDo.Client.SFTP.Authentications.PublicKey
.LicenseKey = mConfig.WeOnlyDo_LicenceKey
.Timeout = mConfig.FTP_TimeOut
End With
Catch ex As Exception
mLOG.Error( Error to set parameters when InitFTP , ex)
End Try

Hi Gary,

We never had reports of such errors. Can you perhaps provide us more details?

What environment is this occuring in?

From the exception I see that this occurs when initializing wodKeyManager.Net. Can you show me the part of code where you declare and initialize it?

Regards,
Damba

[code][/code]

Re: WOD SFTP

by wodDamir, Tuesday, July 07, 2009, 09:09 (5619 days ago) @ Gary

Gary,

I assume you declared km variable previously to assigning it. Can you step thru debugger to see ehich line exactly produces the error?

Also, which environment are you using the component in?

Regards,
Damba

Re: WOD SFTP

by Gary, Tuesday, July 07, 2009, 09:24 (5619 days ago) @ wodDamir

Hi Damba,

These 2 lines is included in the code:

Private km As WeOnlyDo.Security.Cryptography.KeyManager
Private type As WeOnlyDo.Security.Cryptography.SSHKeyTypes


From the applicaiton log, the exception is catched when running at this statement:

km = New WeOnlyDo.Security.Cryptography.KeyManager

The environment using is dotnet 1.1

Re: WOD SFTP

by wodDamir, Tuesday, July 07, 2009, 10:04 (5619 days ago) @ Gary

Gary,

Can you please contact us on techsupport@weonlydo.com ?

I'll then send you wodKeyManager.Net built for .Net 1.1. Most probably this is why you are receiving this issue.

Regards,
Damba