Home Forums .NET libraries Xceed SFTP/FTP for .NET Implicit vs Explicit Secure FTP connection over web

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21280 |

    Hi,

    I need to work on Implicit secure ftp connection over the web. Here the code which does the authentication

    fc =

    new Xceed.Ftp.FtpClient();
    fc.CertificateReceived += new CertificateReceivedEventHandler(fc_CertificateReceived);
    fc.CommandSent +=
    new CommandSentEventHandler(fc_CommandSent);
    fc.ReplyReceived +=
    new ReplyReceivedEventHandler(fc_ReplyReceived);
    fc.StateChanged +=
    new EventHandler(fc_StateChanged);
    fc.FileTransferStatus +=
    new FileTransferStatusEventHandler(fc_FileTransferStatus);
    fc.RepresentationType =
    RepresentationType.Ascii;

    fc.Connect(ftpaddr);
    fc.Authenticate(AuthenticationMethod.tls, VerificationFlags.None, null, DataChannelProtection.Private);

    if

    (fc.Connected)
    {
         if (usrname.Trim() == “”)
         fc.Login(
    null, null);
         else
         fc.Login(usrname, pwd);

         foreach (string file in filelist)
        {
          fc.SendFile(file);
        }
    }

    But it sends the AUTH TLS command. I dont want to send AUTH command to the connection.

    Could you please help me, how to do the Implicit Secure FTP.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Rajkumar (had 1891 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    I was able to fix the issue. Gave the authentication method on connect parameter itself. then it started to work. I don’t know what is the difference between authenticating on connect and after connect trying to do the authenticate.

    –Thx

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Rajkumar (had 299 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Rajkumar, 

    There are 2 types of secure connections: “Implicit” and “Explicit”.

    In “Implicit connections”, you pass the AuthenticationMethod as a paramater to Connet() method, and you dont need to call the Authenticate() method after, simply the Login()  method.
    Code Sample:
        client.Connect( servername, AuthenticationMethod.Ssl, VerificationFlags.None, null );
        client.Login( username, password );

    In “Explicit connections”, you must call the Connect() method without SSL parameters, and then call the Authenticate() method later on before calling the Login() method.
    Code Sample:
        client.Connect( servername );
        client.Authenticate(AuthenticationMethod.Ssl, VerificationFlags.None, null, DataChannelProtection.Private );
        client.Login( username, password );

     

    Regards,

    Alain Jreij,

    Xceed Technical Support 

     

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Alain [Xceed] (had 1634 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.