ServicePointManager.EnableDnsRoundRobin Proprietà

Definizione

Ottiene o imposta un valore che indica se una risoluzione DNS (Domain Name Service) ruota tra gli indirizzi IP (Internet Protocol) applicabili.

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

Valore della proprietà

false se una risoluzione DNS restituisce sempre il primo indirizzo IP per un determinato host; in caso contrario true, . Il valore predefinito è false.

Esempio

Nell'esempio di codice seguente questa proprietà viene impostata.

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

Commenti

Quando più di un indirizzo IP è associato a un nome host, in genere una risoluzione DNS restituisce solo il primo indirizzo IP. Se si imposta questa proprietà su true, le risoluzioni DNS successive verranno scorrere tutti gli indirizzi IP disponibili per un determinato host. Questa opzione è utile quando un servizio usa DNS come meccanismo di bilanciamento del carico tra server o cluster server.

Note

Questa proprietà viene implementata solo in .NET Framework.

Si applica a

Vedi anche