SocketTools .NET Edition

FtpClient.Passive Property

Gets and sets a value which specifies if passive mode file transfers should be enabled.

[Visual Basic]
Public Property Passive As Boolean
[C#]
public bool Passive {get; set;}

Property Value

A boolean value which specifies if passive mode file transfers are enabled. If this value is set to true, passive mode is enabled. If the value is set to false, then passive mode transfers are disabled. The default value is true.

Remarks

When the client uploads or downloads a file and the Passive property is set to false, the server establishes a second connection back to the client which is used to transfer the file data. However, if the local system is behind a firewall or a NAT router, the server may not be able to create the data connection and the transfer will fail. By setting this property to true, it forces the client to establish an outbound data connection with the server. It is recommended that most applications use passive mode whenever possible.

Setting this property to true is the same as specifying the optionPassive flag when establishing a connection to the server.

See Also

FtpClient Class | SocketTools Namespace