Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.4k views
in .NET FTP by (260 points)
I recently downloaded the trial version of edtFTPnetPro (Aug 2014). I have been unable to "fully" connect to a third-party. I have verified my connection parameters using FileZilla 3.5.3 and I am able to upload and download files with the third-party server.

In the ExampleViewer, I entered the parameters in the 'How to connect to an FTP server' and the directory listing examples. However, my connection times-out once the server returns "SSH-2.0-1.36_sshlib GlobalSCAPE" (see below). I have been searching the forums but have not found examples similar to mine. I am somewhat stumped since the example viewer can not connect and there are no options for additional connection parameters. I have tried several other SFTP servers I connect to and those work. I am also awaiting a responses from the third-party.

Any suggestions you may provide would be much appreciated.
Thank you

from Debug Log:
DEBUG : Successfully connected to xxx.xxx.xxx.xxx:23
DEBUG : Setting socket timeout=30000
INFO : Command encoding=System.Text.SBCSCodePageEncoding
DEBUG : SSH-2.0-1.36_sshlib GlobalSCAPE

*** Connection times-out here ***

ERROR : Control channel unexpectedly closed ('' read so far)
DEBUG : Closing connection (instance=20)

5 Answers

0 votes
by (51.6k points)
Please run the following code and e-mail the log file to [url=mailto:sales@enterprisedt.com]sales@enterprisedt.com[/url]:
Logger log = Logger.GetLogger("SecureFTPConnection");
SecureFTPConnection sftp = null;

try
{
    // set up logging
    SecureFTPConnection.LogLevel = LogLevel.All;
    SecureFTPConnection.LogFile = "ftp.log";

    // create connection
    sftp = new SecureFTPConnection
    {
        ServerAddress = "sftp.server.com",
        UserName = "sftp-user",
        Password = "sftp-password",
        Protocol = FileTransferProtocol.SFTP,
        ServerValidation = SecureFTPServerValidationType.None
    };

    // connect
    sftp.Connect();

    foreach (string f in sftp.GetFiles())
        log.Info(f);
}
catch (Exception ex)
{
    log.Error(ex);
}
finally
{
    if (sftp != null)
        sftp.Close();
}


- Hans (EnterpriseDT)
0 votes
by (162k points)
You seem to be trying to use FTP to connect to an SFTP server - they are different protocols.

If you want to connect to an SFTP server, use the SFTP examples.

You also appear to be using port 23. For SFTP, this should be 22. For FTP, it should be 21.
0 votes
by (260 points)
Hans,

Adding "Protocol = FileTransferProtocol.SFTP" was what I was missing. Since I can now change directories and upload/download files I will not be sending the log file. Now that this is working we will be buying a license.

Thank you for your quick response!
0 votes
by (140 points)
I am using UEStudio version 10.30.0.1001 and am suffering this problem.

I havent tried the fix above as yet and will wait to see if anyone can help any further before doing so.

Anyone?
0 votes
by (162k points)
Please try the suggested fix.

Categories

...