Welcome to the Xceed Community | Help
Community Search  
More Search Options

Implicit vs Explicit Secure FTP connection over web

Sort Posts: Previous Next
  •  10-22-2009, 3:31 PM Post no. 24620

    Implicit vs Explicit Secure FTP connection over web

    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.

    Filed under: , , ,
  •  10-23-2009, 2:29 PM Post no. 24639 in reply to 24620

    Re: Implicit Secure FTP connection over web

    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

  •  10-23-2009, 4:00 PM Post no. 24643 in reply to 24639

    Re: Implicit Secure FTP connection over web

    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 


     


    Regards,

    Alain Jreij,

    Web Developer,

    Xceed Software Inc
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.