none
Connect to a z/OS FTP server - Implicit SSL using C#.NET RRS feed

  • Question

  • I'm trying to connect to a z/OS FTP server from C#.NET code but the connection could not established in data retrieval part.  I am using the  FluentFTP .net library  from GitHub and connection established in the first level control channel . however the data channel network connection is failed . I am able to create /change directory in FTPS server but unable to get data retrieval is like GetList,Download file, Upload file etc...

    Error messages when connecting data channel network connection. 

    (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <IP><Random port>) ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <IP><Random port>) 

    Below is my code during connection. 

    using (FtpClient client = new FtpClient())
                    {
                       client.Credentials = new NetworkCredential(ftpUserID, ftpPassword);
                       client.Host = ftpServerIP;
                        client.Port = port;
                        client.EncryptionMode = FtpEncryptionMode.Implicit;
                        client.DataConnectionType = FtpDataConnectionType.PASV;
                   
                        client.DataConnectionEncryption = true;
                        client.ValidateCertificate += new FtpSslValidation(ValidateCertificate);
                        client.SslProtocols = System.Security.Authentication.SslProtocols.Tls12;
                        client.Encoding = System.Text.Encoding.ASCII;
                        client.SocketKeepAlive = true;

    So, please clarify below queries.

    1) My # code uses the passive FTP mode, so Is there any additional property needs to be set to access the Data transfer channel from FTPS implicit SSL?

    2) Is FtpWebRequest support the Implicit SSL in .NET framework 4.6?

    3) If this approaches is not possible, pleas suggest me other .NET supported class library or 3rd party tools

    Appreciate your help

    Thank you,

    • Moved by CoolDadTx Thursday, July 6, 2017 1:02 AM Third party related
    Tuesday, July 4, 2017 2:09 PM

All replies

  • These forums are for MS products only. If you're having an issue using a third party FTP library then please post your question in their GitHub repo.
    Thursday, July 6, 2017 1:02 AM
  • Thank for your response.

    Could you please confirm whether the FtpWebRequest class support the Implicit SSL in .NET framework 4.6 or any other approaches in MS ?

    Thank you

    Tuesday, July 11, 2017 12:02 AM