FTPS connection failed

0
Hi, I tried to connect to FTPS. But get this error: ComponentPro.Net.TlsException: Connection was close 2.Using this code private async Task Connect() { using (Ftp client = new Ftp()) { //Set the licence Key ComponentPro.Licensing.Common.LicenseManager.SetLicenseKey(FtpsLicenseKey); //Connect to the FTP server. if (FtpsPort == 21) { await client.ConnectAsync(FtpsServerName, FtpsPort, SslSecurityMode.Explicit); } else { client.Connect(FtpsServerName, FtpsPort, SslSecurityMode.Implicit); } // Authenticate. await client.AuthenticateAsync(FtpsUserName, FtpsPassword); } }
ftp
 
asked 6/15/2022 10:47:57 AM
add a comment

3 Answers

0
This the packages that i used:
edited 6/22/2022 10:16:58 AM
answered 6/20/2022 10:09:52 AM
add a comment
0
Hi, I used this code like in your reference and get this error, using core NuGet packages, what do I miss ? Code ===== private void Connect() { using (Ftp client = new Ftp()) { //Set the licence Key ComponentPro.Licensing.Common.LicenseManager.SetLicenseKey(FtpsLicenseKey); //Connect to the FTP server. if (FtpsPort == 21) { client.Connect(FtpsServerName, FtpsPort, SslSecurityMode.Explicit); } else { client.Connect(FtpsServerName, FtpsPort, SslSecurityMode.Implicit);// Exception throw here ? } // Authenticate. client.Authenticate(FtpsUserName, FtpsPassword); } } Error: ====== ComponentPro.Net.TlsException HResult=0x80131500 Message=Connection was closed by the remote connection end. Source=ComponentPro.Ftp.NetCore StackTrace: at ComponentPro.Net.Ftp.c_d8db87dc(String , Int32 , SslConfigBase , SslSecurityMode , FtpSslExplicitAuthType , AsyncOperation ) at ComponentPro.Net.Ftp.Connect(String serverName, Int32 serverPort, SslSecurityMode security) This exception was originally thrown at this call stack: [External Code] Inner Exception 1: TlsException: Connection was closed by the remote connection end. Inner Exception 2: TlsException: Connection was closed by the remote connection end.
 
answered 6/20/2022 9:34:04 AM
add a comment
0
Hi danies8, Kindly follow this documentation [FTP DOC][1] , I think its a SSL issue . [1]: https://doc.componentpro.com/ComponentPro-Ftp/explicit-or-implicit-ssl
 
answered 6/20/2022 4:46:17 AM
  Any answer ? danies8 6/22/2022 10:17:20 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged ftp or ask your own question.