Trying out your class and love it, but...

Apr 15, 2011 at 6:31 PM

This class is great and kind of easy to use, but I am trying to use it with -sslInvalidServerCertHandling Accept in the API but I am having trouble. I saw the post about implementing it but I do not understand how to accomplish this in VB.net.

New RemoteCertificateValidationCallback(ValidateTestServerCertificate)
 gives me an error about addressof and I am not sure how to use this correctly.

Can you please help me cross this hurdle, Thanks a bunch,
Larry
Apr 15, 2011 at 6:36 PM

Nevermind, through playing around I found that just adding AddressOf in front of the ValidateTestServerCertificate worked correctly, so if anyone else gets this they can use this for VB....

Private Function ValidateTestServerCertificate(ByVal sender As ObjectByVal certificate As X509CertificateByVal chain As X509ChainByVal sslPolicyErrors As SslPolicyErrorsAs Boolean
        ValidateTestServerCertificate = True
 
    End Function
...
Client.Connect("myftpserver"New NetworkCredential("username",
                                                 "password"), ESSLSupportMode.DataChannelRequired, New RemoteCertificateValidationCallback(AddressOf ValidateTestServerCertificate))

Thanks for your class,
Larry