0 votes
by (120 points)
edited

I copied the following example and I get the message "No connection could be made because the target machine actively refused it." at the ftp.Connect step.

What now?

   Dim ftp As New Ftp()

    ' Create an instance of TlsParameters class and 
    ' set the certificate request handler to  
    ' CertificateRequestHandler.StoreSearch. 
    Dim par As New TlsParameters()
    par.CertificateRequestHandler = CertificateRequestHandler.StoreSearch

    ' Connect securely using explicit SSL. 
    ' The third argument refers to the parameters class. 
    ftp.Connect(FTPServer, 21, par, FtpSecurity.Explicit)

    ' Connection is protected now, we can log in safely. 
    ' Some servers may not require login if the client 
    ' successfully authenticated itself using a certificate 
    ' known to the server - there is no need to call the Login 
    ' method in these cases. 
    ftp.Login(FTPUser, FTPPassword)
Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (144k points)

Are you able to connect to the same FTP server using Windows command-prompt "ftp" utility?

...