ServicePointManager.DnsRefreshTimeout Propiedad

Definición

Obtiene o establece un valor que indica cuánto tiempo se considera válida una resolución del Servicio de nombres de dominio (DNS).

C#
public static int DnsRefreshTimeout { get; set; }

Valor de propiedad

Valor del tiempo de espera en milisegundos. Un valor de -1 indica un período de tiempo de espera infinito. El valor predeterminado es 120.000 milisegundos (dos minutos).

Ejemplos

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

C#
ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;
ServicePointManager.EnableDnsRoundRobin = true;
ServicePointManager.DnsRefreshTimeout = 4*60*1000; // 4 minutes

Se aplica a

Producto Versiones
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Consulte también