0 votes
by (270 points)

Hello
Does Rebex.FTP have equivalent to the System.Net.FtpClient.FtpDataConnectionType and how it is set for the FTP client?
Thank you

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (72.7k points)

The Rebex FTP API is designed a little different. However, behavior of the System.Net.FtpClient.FtpDataConnectionType can be achieved.

At first step, you have to thing, whether you want to use Passive or Active connection type. To set this, use the Ftp.Passive property (default is true = passive). It corresponds to PASV and PORT values.

The EPSV and EPRT values corresponds to setting the Ftp.Settings.ForceExtendedDataChannelCommand option to true.

Finally, the PASVEX value corresponds to setting the Ftp.Settings.IgnorePassiveModeAddress option to true.

Please note, that Rebex FTP has a workaround for FTP servers that announce private range IP addresses even though a public IP was used to connect to them. By default, when such server is detected, an IP address announced by the server in response to PASV command is overridden with an IP used by the control connection.

To disable this workaround set the Ftp.Settings.DisableInvalidPassiveModeAddressWorkaround option to true.

...