Home Forums .NET libraries Xceed SFTP/FTP for .NET 421 Timeout (120 seconds): closing control connection.

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

    Hi,

     I am using Xceed FTP component to send the files to ftp server. Using the Xceed FTP version 2.0.100.0.
    Just doing simple FTP file transfer. Getting an error while transfering small files like 1Kb or 2Kb, sometimes for 120Kb.
    This issue was happened with ASync FTP, so we changed it to regular simple FTP. But doesn’t help us, same issues happens frequently.

    Please find the following code and trace with error.

    CODE:

    Xceed.Ftp.FtpClient fc;

    try

    {

    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.Connect(ftpaddr);

    if (fc.Connected)

    {

    fc.Login(usrname, pwd);

    fc.SendFile(path);

    }

     

    fc.Disconnect();

    }

    catch(Exception e)

    {

    FTPErrorLog(e.Message);

    }

    finally

    {

    fc =

    null;

    }

     

    TRACE LOG

    02/06/2009 11:54:34, FTP State Changed: Connecting
    02/06/2009 11:54:34, Reply Received: 220 Microsoft FTP Service

    02/06/2009 11:54:34, FTP State Changed: Connected
    02/06/2009 11:54:34, FTP State Changed: LoggingIn
    02/06/2009 11:54:34, Command Sent: USER Administrator
    02/06/2009 11:54:34, Reply Received: 331 Password required for Administrator.

    02/06/2009 11:54:34, Command Sent: PASS ******
    02/06/2009 11:54:34, Reply Received: 230 User Administrator logged in.

    02/06/2009 11:54:34, FTP State Changed: Connected
    02/06/2009 11:54:34, FTP State Changed: SendingFile
    02/06/2009 11:54:34, Command Sent: TYPE I
    02/06/2009 11:54:34, Reply Received: 200 Type set to I.

    02/06/2009 11:54:34, Command Sent: PASV
    02/06/2009 11:54:34, Reply Received: 227 Entering Passive Mode (192,168,3,53,15,236).

    02/06/2009 11:54:34, Command Sent: STOR 999999999994_TOD200809_02_06_2009.csv
    02/06/2009 11:54:34, Reply Received: 125 Data connection already open; Transfer starting.

    02/06/2009 11:54:34, Sending File: F:\Export\TypeOfDisabilityExtractFTP\SDBocesMonroe1\999999999994_TOD200809_02_06_2009.csv, Bytes Total: 19789, Bytes Transfered: 0
    02/06/2009 11:54:34, Sending File: F:\Export\TypeOfDisabilityExtractFTP\SDBocesMonroe1\999999999994_TOD200809_02_06_2009.csv, Bytes Total: 19789, Bytes Transfered: 4096
    02/06/2009 11:54:34, Sending File: F:\Export\TypeOfDisabilityExtractFTP\SDBocesMonroe1\999999999994_TOD200809_02_06_2009.csv, Bytes Total: 19789, Bytes Transfered: 8192
    02/06/2009 11:54:34, Sending File: F:\Export\TypeOfDisabilityExtractFTP\SDBocesMonroe1\999999999994_TOD200809_02_06_2009.csv, Bytes Total: 19789, Bytes Transfered: 12288
    02/06/2009 11:54:34, Sending File: F:\Export\TypeOfDisabilityExtractFTP\SDBocesMonroe1\999999999994_TOD200809_02_06_2009.csv, Bytes Total: 19789, Bytes Transfered: 16384
    02/06/2009 11:54:34, Sending File: F:\Export\TypeOfDisabilityExtractFTP\SDBocesMonroe1\999999999994_TOD200809_02_06_2009.csv, Bytes Total: 19789, Bytes Transfered: 19789
    02/06/2009 11:54:34, Reply Received: 226 Transfer complete.

    02/06/2009 11:54:34, FTP State Changed: Connected
    02/06/2009 11:54:34, FTP State Changed: Disconnecting
    02/06/2009 11:54:34, Command Sent: QUIT
    02/06/2009 11:54:34, FTP State Changed: NotConnected
    02/06/2009 11:54:35, FTP State Changed: Connecting
    02/06/2009 11:54:35, Reply Received: 220 Microsoft FTP Service

    02/06/2009 11:54:35, FTP State Changed: Connected
    02/06/2009 11:54:35, FTP State Changed: LoggingIn
    02/06/2009 11:54:35, Command Sent: USER Administrator
    02/06/2009 11:54:35, Reply Received: 331 Password required for Administrator.

    02/06/2009 11:54:35, Command Sent: PASS ******

    02/06/2009 11:54:35, Reply Received: 230 User Administrator logged in.

    02/06/2009 11:54:35, FTP State Changed: Connected
    02/06/2009 11:54:35, FTP State Changed: SendingFile
    02/06/2009 11:54:35, Command Sent: TYPE I
    02/06/2009 11:54:35, Reply Received: 200 Type set to I.

    02/06/2009 11:54:35, Command Sent: PASV
    02/06/2009 11:54:35, Reply Received: 227 Entering Passive Mode (192,168,3,53,15,237).

    02/06/2009 11:54:35, Command Sent: STOR 999999999996_TOD200809_02_06_2009.csv
    02/06/2009 11:54:35, Reply Received: 125 Data connection already open; Transfer starting.

    02/06/2009 11:54:35, Sending File: F:\Export\TypeOfDisabilityExtractFTP\SDMexico\999999999996_TOD200809_02_06_2009.csv, Bytes Total: 65, Bytes Transfered: 0
    02/06/2009 11:54:35, Sending File: F:\Export\TypeOfDisabilityExtractFTP\SDMexico\999999999996_TOD200809_02_06_2009.csv, Bytes Total: 65, Bytes Transfered: 0
    02/06/2009 11:54:35, Reply Received: 226 Transfer complete.

    02/06/2009 11:56:45, Reply Received: 421 Timeout (120 seconds): closing control connection.

    02/06/2009 11:56:45, Reply Received: 421 Terminating connection.

    02/06/2009 11:56:45, FTP State Changed: NotConnected

     ERROR Message

    An error occurred while reading from or writing to the data channel.

    Appreciate your help.

    –Raj

     

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

    User (Old forums)
    Member
    Post count: 23064

    We have a fix for this issue, and it will be available in our next release, which should be available at the beginning of march 2009.  Meanwhile, unfortunately, there is no workaround.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 3011 views)

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