ServicePointManager.DnsRefreshTimeout Property

Note: This property is new in the .NET Framework version 2.0.

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)

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 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions