ServicePointManager.EnableDnsRoundRobin Propiedad

Definición

Obtiene o establece un valor que indica si una resolución del Servicio de nombres de dominio (DNS) rota entre las direcciones del protocolo Internet (IP) aplicables.

public:
 static property bool EnableDnsRoundRobin { bool get(); void set(bool value); };
public static bool EnableDnsRoundRobin { get; set; }
static member EnableDnsRoundRobin : bool with get, set
Public Shared Property EnableDnsRoundRobin As Boolean

Valor de propiedad

Es false si una resolución de DNS siempre devuelve la primera dirección IP para un host determinado; de lo contrario, es true. De manera predeterminada, es false.

Ejemplos

En el ejemplo de código siguiente se establece esta propiedad.

ServicePointManager::UseNagleAlgorithm = true;
ServicePointManager::Expect100Continue = true;
ServicePointManager::CheckCertificateRevocationList = true;
ServicePointManager::DefaultConnectionLimit =
    ServicePointManager::DefaultPersistentConnectionLimit;
ServicePointManager::EnableDnsRoundRobin = true;
ServicePointManager::DnsRefreshTimeout = 4*60*1000; // 4 minutes
ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;
ServicePointManager.EnableDnsRoundRobin = true;
ServicePointManager.DnsRefreshTimeout = 4*60*1000; // 4 minutes
ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
    ServicePointManager.DefaultPersistentConnectionLimit
ServicePointManager.EnableDnsRoundRobin = True
ServicePointManager.DnsRefreshTimeout = 4*60*1000

Comentarios

Cuando hay más de una dirección IP asociada a un nombre de host, una resolución DNS normalmente devuelve solo la primera dirección IP. Si establece esta propiedad trueen , las resoluciones dns posteriores recorrerán todas las direcciones IP disponibles para un host determinado. Esta opción es útil cuando un servicio usa DNS como mecanismo de equilibrio de carga entre servidores o clústeres de servidores.

Se aplica a

Consulte también