0 votes
by (170 points)

Hello,

I'm trying to use the Rebex FTP/SSL library.

I'm connected successfully to a Java server.

But i can't do anything with the client (Upload / Download / Rename / Delete).

When i'm trying i have this error message :

Rebex.Net.FtpException: Timeout exceeded.
at Rebex.Net.Ftp.TL () [0x000a4] in <6ec8d5f3f62a4b8bb1098f4ae2b7edbe>:0
at Rebex.Net.Ftp.RL (System.Int32 Z, System.Boolean T) [0x000ea] in <6ec8d5f3f62a4b8bb1098f4ae2b7edbe>:0

Here is the code :

try
        {
            client.Rename("/Hello.txt", "/file.txt");
        }
        catch (Exception e)
        {
            Debug.WriteLine("FTPDebug : err " + e.ToString());
        }

I've seen this post on the forum : http://forum.rebex.net/3857/smtp-timeout-exception-when-trying-to-send?show=3857#q3857

The solution was to disable the Chunking and Pipelining extensions.

But it was for VB and i'm programming with Xamarin.

Chuking and Pipelining are only for SMTP ?
How can i disable them ?
Btw i'm using Visual Studio 2015 community and Xamarin 4.4.0.34

Thanks for reading me !

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (73.6k points)

Hello,

the mentioned answer was for SMTP protocol only. FTP protocol has other specialties, which can be utilized.

Can you please send us communication log to support@rebex.net, it can expose the source of the problem (session settings, etc.)
The log can be created like this:

var client = new Rebex.Net.Ftp();
client.LogWriter = new Rebex.FileLogWriter(@"c:\data\ftp.log", Rebex.LogLevel.Debug);
by (170 points)
Hello again !

After few research it's appear that the problem can come from client's passive mode.

Can i use active mode instead ?

EDIT: Found
by (148k points)
Active mode with TLS/SSL is notoriously firewall-unfriendly. Passive mode is usually a better choice.
by (170 points)
Hello !

Yeah, i've tried many things.

Actually, i've still the same error. I'm sure now it's coming from the server. Then you can't do anything for me, i'll up the solution when i'll find it.

By the way, thanks for the supports, i really appreciate the helps !
by (148k points)
If passive mode over TLS/SSL doesn't work due to a misconfigured FTP server which is unable to accept those data connections, it might still be possible to get the active mode working. From the server's point-of-view, active mode is simple. But it poses a big challenge for the client which needs to be able to accept incoming connections from the server - and that requires a specifically configured firewall at the client.

Yet another option worth considering would be switching to another protocol - SFTP runs over SSH which only uses a single connection (on port 22) for both data and commands, eliminating the firewall-related problems that have been plaguing the FTP protocol since early 1990s, when firewalls became widespread.
by (170 points)
Hello !

Thanks for the quick reply, i was thinking about an SFTP server instead of the FTP / SSL.

The server is made on a Android's hotspot and i can't find anything if there is some firewalls.
...