ServicePointManager.DnsRefreshTimeout Свойство

Определение

Возвращает или задает значение, указывающее промежуток времени, в течение которого разрешение DNS-имени считается допустимым.

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

Значение свойства

Значение времени ожидания в миллисекундах. Значение -1 указывает на бесконечное время ожидания. По умолчанию установлено значение 120 000 миллисекунд (2 минуты).

Примеры

В следующем примере кода задается это свойство.

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

Применяется к

См. также раздел