Options Property  
 

Gets and sets the options that are used when resolving a host name.

Syntax

object.Options [= value ]

Remarks

The Options property is an integer which specifies one or more options which are used when resolving a host name. The property value is created by using a bitwise operator with one or more of the following values:

Value Description
dnsOptionNone No additional resolver options specified. This is the default value, and it is recommended that most applications do not specify additional options unless the implications of doing so are understood.
dnsOptionPromote Promotes the server that successfully completed the last query to the first server that will be used to resolve subsequent queries. This option can improve performance in some cases where one or more of the registered servers are non-responsive. This option takes precedence over the dnsOptionRotate option.
dnsOptionRotate Enables a round-robin selection of nameservers when performing queries. Normally each nameserver is queried in the same order. This option rotates the available nameservers so a different server is used with each query.
dnsOptionAuthOnly Require the answer from the nameserver to be authoritative, not from the server's cache. This option is included for future expansion as most servers do not support this feature and will ignore it.
dnsOptionPrimary Queries are only accepted from the primary nameserver. This option is included for future expansion as most servers do not support this feature and will ignore it.
dnsOptionNoRecurse Disable the sending of recursive queries to the nameserver. Specifying this option will disable the bit in the DNS request header that specifies recursion is desired.
dnsOptionNoSearch Disable additional queries of higher domains in the search list if the host name cannot be resolved. If this option is specified, and the host name cannot be resolved using the local domain name an error is returned immediately. This option is ignored if no local domain has been specified or if the dnsOptionNoSuffix option has been specified.
dnsOptionNoSuffix Disable additional queries using the local domain name if the host name is not a fully qualified domain name and cannot be resolved. This option is ignored if no local domain has been specified.
dnsOptionNoNameCheck Disable checking the host name for invalid characters, such as the underscore and control characters. By default, host names are checked to ensure they're valid before submitting a query to the nameserver.

It is recommended that most applications do not specify any resolver options and use the default behavior. Specifying these options without understanding how they can affect standard queries can result in unexpected failures. In particular, caution should be used when specifying the dnsOptionNoRecurse and dnsOptionNoSearch options as they change the normal process of resolving a host name.

Data Type

Integer (Int32)

See Also