Ftp Connection Issue

Sep 20, 2011 at 4:27 PM

Hi ,

 I want to connect to ftp through AlexPilotti.
Below is my code .

 Using objFTP As New FTPS.Client.FTPSClient

 

 

objFTP.Connect(_Url,

New NetworkCredential(_UserName, _Password), AlexPilotti.FTPS.Client.ESSLSupportMode.ClearText Or AlexPilotti.FTPS.Client.ESSLSupportMode.DataChannelRequested, New RemoteCertificateValidationCallback(AddressOf validateCert))

 

 Dim objintq As Int16 = objFTP.GetDirectoryList().Count

 

 End Using

  

But this give me error: The requested name is valid, but no data of the requested type was found

and stack trace is as:


at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)

at AlexPilotti.FTPS.Client.FTPSClient.SetupCtrlConnection(String hostname, Int32 port, Encoding textEncoding)

at AlexPilotti.FTPS.Client.FTPSClient.Connect(String hostname, Int32 port, NetworkCredential credential, ESSLSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate, X509Certificate x509ClientCert, Int32 sslMinKeyExchangeAlgStrength, Int32 sslMinCipherAlgStrength, Int32 sslMinHashAlgStrength, Nullable`1 timeout, Boolean useCtrlEndPointAddressForData, EDataConnectionMode dataConnectionMode)

at AlexPilotti.FTPS.Client.FTPSClient.Connect(String hostname, Int32 port, NetworkCredential credential, ESSLSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate, X509Certificate x509ClientCert, Int32 sslMinKeyExchangeAlgStrength, Int32 sslMinCipherAlgStrength, Int32 sslMinHashAlgStrength, Nullable`1 timeout, Boolean useCtrlEndPointAddressForData)

at AlexPilotti.FTPS.Client.FTPSClient.Connect(String hostname, Int32 port, NetworkCredential credential, ESSLSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate, X509Certificate x509ClientCert, Int32 sslMinKeyExchangeAlgStrength, Int32 sslMinCipherAlgStrength, Int32 sslMinHashAlgStrength, Nullable`1 timeout)

at AlexPilotti.FTPS.Client.FTPSClient.Connect(String hostname, NetworkCredential credential, ESSLSupportMode sslSupportMode, RemoteCertificateValidationCallback userValidateServerCertificate)

at CESIReportExecAdmin.ServerFileAccess.setEncryptedFiles(Stream theStream, String filename) in file name)

Please help me to out from this error.

I want to connect ftp with implicit ssl.