ServicePointManager.DnsRefreshTimeout Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, jak długo rozpoznawanie usługi nazw domen (DNS) jest uznawane za prawidłowe.

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

Wartość właściwości

Wartość limitu czasu w milisekundach. Wartość -1 wskazuje nieskończony limit czasu. Wartość domyślna to 120 000 milisekund (dwie minuty).

Przykłady

Poniższy przykład kodu ustawia tę właściwość.

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; // 4 minutes
ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
    ServicePointManager.DefaultPersistentConnectionLimit
ServicePointManager.EnableDnsRoundRobin = True
ServicePointManager.DnsRefreshTimeout = 4*60*1000

Dotyczy

Zobacz też