Options Property  
 

Gets and sets the default connection options for the control.

Syntax

object.Options [= options ]

Remarks

The Options property returns or modifies the options used for retrieving and sending files. The value is represented as one or more bit flags which may be combined using the logical or operator. The following options are defined:

Value Description
fileOptionNoCache This instructs an HTTP server to not return a cached copy of the resource. When connected to an HTTP 1.0 or earlier server, this directive may be ignored.
fileOptionSecureImplicit This option specifies the client should immediately negotiate for a secure session upon establishing a connection with the server. This is the default method for connecting to a secure HTTP server and may also be used with FTP servers that accept secure connections on port 990.
fileOptionSecureExplicit This option specifies the client should use the AUTH server command to tell an FTP server that it wishes to explicitly negotiate a secure connection. This requires that the server support the AUTH TLS or AUTH SSL commands. Some servers may not require this option, and some may require the option only if a port other than 990 is specified. If this option is specified, the Secure property will automatically be set to True.
fileOptionSecureShell This option specifies the client should use the Secure Shell (SSH) protocol to establish the connection. This option will automatically be selected if the connection is established using port 22, the default port for SSH, and is only required if the server is configured to use a non-standard port number.
fileOptionSecureFallback This option specifies the client should permit the use of less secure cipher suites for compatibility with legacy servers. If this option is specified, the client will allow connections using TLS 1.0 and cipher suites that use RC4, MD5 and SHA1.
fileOptionPreferIPv6 This option specifies the client should only attempt to resolve a domain name to an IPv6 address. If the domain name has both an IPv4 and IPv6 address assigned to it, the default is to use the IPv4 address for compatibility purposes. Enabling this option forces the client to always use the IPv6 address if one is available. If the domain name does not have an assigned IPv4 address, the IPv6 address will always be used regardless if this option is specified.
fileOptionHiResTimer This option specifies the elapsed time for data transfers should be returned in milliseconds instead of seconds. This will return more accurate transfer times for smaller files being uploaded or downloaded using fast network connections.
fileOptionTLSReuse This option specifies that TLS session reuse should be enabled for secure data connections. This option is only supported on Windows 8.1 or Windows Server 2012 R2 and later platforms. Some servers may require this option be enabled, although it should only used when required. This option is only valid for secure FTP (FTPS) connections and is not used with SFTP or secure HTTP connections.

The Options property enables you to set the default options for subsequent connections using the Connect method, and some options may only be available for certain types of connections. For example, the fileOptionSecureExplicit option is only valid for secure FTP connections.

The fileOptionTLSReuse option allows a client and server to reuse security information from an existing TLS connection when establishing another secure connection. This can reduce the time and processing required to establish the new connection. For secure FTP (FTPS), session reuse is particularly important because the protocol uses separate connections for commands and file transfers. Some FTP servers require the data connection to reuse the security context established by the control connection as an additional security measure.

The mechanism used for TLS session resumption depends on the protocol version. TLS 1.2 and earlier versions use traditional session identifiers or session tickets, while TLS 1.3 uses a different mechanism based on pre-shared keys and session tickets. When TLS session reuse is enabled, the library uses the same security context for both the FTP control and data connections, regardless of the negotiated TLS version. The actual resumption behavior depends on the TLS implementation and server support.

Data Type

Integer (Int32)

See Also