Options Property  
 

Gets and sets the options for the current object.

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 Constant Description
1 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.
&H1000 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.
&H2000 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.
&H4000 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.
&H8000 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.
&H40000 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.
&H100000 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.
&H200000 fileOptionTLSReuse This option specifies that TLS session reuse should be enabled for secure data connections. 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. See the remarks below for more information.

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 is only supported on Windows 8.1 or Windows Server 2012 R2 and later platforms. This option is not compatible with servers built using OpenSSL 1.0.2 and earlier versions which do not provide Extended Master Secret (EMS) support as outlined in RFC7627. To avoid potential problems with server compatibility, you should not specify this option for all FTP connections. It should only be used if specifically required by the server and your end-users should have the ability to selectively enable or disable this option.

Data Type

Integer (Int32)

See Also

Secure Property, Connect Method