ServicePointManager.DnsRefreshTimeout Propriedade

Definição

Recebe ou define um valor que indica quanto tempo uma resolução de Domain Name Service (DNS) é considerada válida.

public:
 static property int DnsRefreshTimeout { int get(); void set(int value); };
public static int DnsRefreshTimeout { get; set; }
static member DnsRefreshTimeout : int with get, set
Public Shared Property DnsRefreshTimeout As Integer

Valor de Propriedade

O valor do time-out, em milissegundos. Um valor de -1 indica um período de tempo limite infinito. O valor padrão é 120.000 milissegundos (dois minutos).

Exemplos

O seguinte exemplo de código define esta propriedade.

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

Observações

Note

Esta propriedade é implementada apenas no .NET Framework.

Aplica-se a

Ver também