Subject: Could not connect with FTPS
Date: 2022-11-16 09:27:43
From: danies8
Source: not-connect-ftps
----------------------------------------------------------------------

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);

            }
        }

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index