PowerTCP FTP for .NET
DataConnectType Enumeration



Enumerates alternatives for establishing the data connection used for file transfers and listings.
Syntax
Public Enum DataConnectType 
   Inherits System.Enum
Dim instance As DataConnectType
public enum DataConnectType : System.Enum 
public enum class DataConnectType : public System.Enum 
Members
MemberDescription
Passive A PASV command is sent to the server and it responds with the address and port it is "passively" listening on.
PassiveOverrideAddress The control connection address should be used for the data connection instead of the address returned by the server in response to the PASV command. Used to compensate for a poorly configured server/firewall combination.
Port A PORT command is sent to the server, which then connects to the client's address and port specified.
Remarks

DataConnectType.Port is used to direct the server to make an active connection to the client. The client accepts the connection. The timeout for accepting the connection from the FTP server is configured by Ftp.Timeout.

DataConnectType.Passive is used to direct the server to accept a passive connection from the client. The client makes an active connection. The technique is often necessary when intermediate proxies or firewalls are used.

DataConnectType.PassiveOverrideAddress is like DataConnectType.Passive except that the address provided by the server is replaced with the address used by the control connection. Please read on for a brief description of why this option might be used.

FTP is not a "firewall friendly" protocol, so some configuration is required when a firewall is used. This will typically involve using DataConnectType.Passive so the server accepts a passive connection. Most servers can be configured to use the external address of its firewall when it builds the PASV response, so the client just connects to this address (like it did to establish the original control connection), and operations proceed normally. If, however, the server is not configured to properly respond to the PASV command with the firewall address, AND the firewall does not replace the response with its own address (or the control connection is encrypted so the PASV response cannot be seen), then use DataConnectType.PassiveOverrideAddress to use the control connection address instead of the address sent by the server. This technique may compensate for a poorly configured server/firewall combination.

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Dart.Ftp.DataConnectType

See Also

Reference

Dart.Ftp Namespace


PowerTCP FTP for .NET Documentation Version 6.1
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic