MailBee.NET Objects 4.0

DnsServerCollection.Autodetect Method ()

Clears and then populates the collection with DnsServer objects by looking up the following sources:

  1. "MailBee.DnsMX.DnsServerCollection" key in the config file.
  2. Windows registry.
  3. WMI database.

public bool Autodetect();

Return Value

true if at least one DNS server was found; otherwise, false.

Remarks

Once at least one DNS server definition is found, these definitions are added to the collection as DnsServer objects, and the method returns.

You can find more information and code samples on MailBee DNS server autodetection mechanism in DnsAutodetectOptions enumeration documentation.

Note   WMI database search requires Full trust for MailBee assembly. If the current security setting is lower than Full trust, WMI database search won't find any DNS server definitions.

See Also

DnsServerCollection Class | MailBee.DnsMX Namespace | DnsServerCollection.Autodetect Overload List | DnsAutodetectOptions