ServicePointManager.DnsRefreshTimeout Özellik

Tanım

Bir Etki Alanı Adı Hizmeti (DNS) çözümünün ne kadar süre geçerli kabul edildiğini gösteren bir değer alır veya ayarlar.

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

Özellik Değeri

Milisaniye cinsinden zaman aşımı değeri. -1 değeri sonsuz zaman aşımı süresini gösterir. Varsayılan değer 120.000 milisaniyedir (iki dakika).

Örnekler

Aşağıdaki kod örneği bu özelliği ayarlar.

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

Açıklamalar

Note

Bu özellik yalnızca .NET Framework'te uygulanır.

Şunlara uygulanır

Ayrıca bkz.