0 votes
by (120 points)
edited

Hi We purchased RebexFtp. We have a Proxy (FreeProxy v: 4.10.1751) configured in Ftp Site mode. When connecting with the sample client application an error is returned:

Error Info: Rebex.Net.FtpException: Expected 'USER', or user name too long. Check that the correct proxy type has been selected (503).
   at Rebex.Net.Ftp.1SAJuN(Int32 , Boolean )
   at Rebex.Net.Ftp.Connect(String serverName, Int32 serverPort, TlsParameters parameters, FtpSecurity security)

I also have tried with

_ftpServer.Options |= FtpOptions.DoNotDetectFeatures;

but its giving me the same error message.

In FileZilla, the order of the Ftp commands is the following:

  1. USER %proxypass
  2. PASS %proxypw
  3. SITE %ftphost
  4. USER %ftpuser
  5. PASS %ftppass
  6. ACCT %account

It seems like Rebex doesn't implement the same order of Ftp commands. Is there any workaround?

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (18.0k points)
edited

The Rebex.Ftp component actually does not support the set of FTP commands as displayed above. There is no prepared FtpProxyType which suits to such set of FTP commands.

Fortunatelly, there is a simple workaround to achieve a connection as described above. Please try the following code:

Ftp client = new Ftp();

// don't set any proxy type (keep default FtpProxyType.None)

client.Connect("proxyHost");
client.Login("proxyUser", "proxyPass");
client.Site("ftpHost");
client.Login("ftpUser", "ftpPass", "account");
...