DnsRefreshTimeout Property

ServicePointManager.DnsRefreshTimeout Property

Gets or sets a value that indicates how long a Domain Name Service (DNS) resolution is considered valid.

Namespace: System.Net
Assembly: System (in system.dll)

Public Shared Property DnsRefreshTimeout As Integer
Dim value As Integer

value = ServicePointManager.DnsRefreshTimeout

ServicePointManager.DnsRefreshTimeout = value
/** @property */
public static int get_DnsRefreshTimeout ()

/** @property */
public static void set_DnsRefreshTimeout (int value)

public static function get DnsRefreshTimeout () : int

public static function set DnsRefreshTimeout (value : int)

Not applicable.

Property Value

The time-out value, in milliseconds. A value of -1 indicates an infinite time-out period. The default value is 120,000 milliseconds (two minutes).

The following code example sets this property.

ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
ServicePointManager.EnableDnsRoundRobin = True
ServicePointManager.DnsRefreshTimeout = 4*60*1000

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

© 2016 Microsoft