Could not connect with FTPS

0
Hi, 1. I used this code and I got this exception: ComponentPro.Net.TlsException: 'Connection was closed by the remote connection end.' 2. I work against server 2019 and is not working but with window 10 it works. 3. I used PackageReference Include="ComponentPro.Ftp" Version="7.2.238" 4. What do I need to do in order to fixed it? Thanks. private void Connect() { using (Ftp client = new Ftp()) { //Set the licence Key ComponentPro.Licensing.Common.LicenseManager.SetLicenseKey(FtpsLicenseKey); //Connect to the FTPS server. if (FtpsPort == 21) { client.Connect(FtpsServerName, FtpsPort, SslSecurityMode.Explicit); } else { client.Connect(FtpsServerName, FtpsPort, SslSecurityMode.Implicit); } // Authenticate. client.Authenticate(FtpsUserName, FtpsPassword); } }
ftp
edited 11/16/2022 9:27:43 AM
asked 11/16/2022 9:05:57 AM
  Is it connected to NuGet Pacake(ComponentPro.Ftp" Version="7.2.238) ? do you have a another soultion or product. danies8 11/16/2022 9:21:29 AM
  I used .Net 6 vs 2022. danies8 11/16/2022 9:50:03 AM
  Using this code is working(Ftp not ftps) using (Ftp client = new Ftp()) { //Set the licence Key ComponentPro.Licensing.Common.LicenseManager.SetLicenseKey(FtpLicenseKey); // Connect to the FTP server. client.Connect(FtpServerName, FtpPort); // Authenticate. client.Authenticate(FtpUserName, FtpPassword); } danies8 11/16/2022 11:40:47 AM
add a comment

1 Answers

0
Hi danies8, It looks like a support issue from OS. Also kindly check by turning off the firewall in windows 2019. Thanks for contacting us.
 
answered 1/4/2023 5:58:12 PM
add a comment

Your Answer

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