ProcessModelSection.IdleTimeout 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,表示非活動期間,過後 ASP.NET 自動結束工作程序。
public:
property TimeSpan IdleTimeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))]
[System.Configuration.ConfigurationProperty("idleTimeout", DefaultValue="10675199.02:48:05.4775807")]
public TimeSpan IdleTimeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))>]
[<System.Configuration.ConfigurationProperty("idleTimeout", DefaultValue="10675199.02:48:05.4775807")>]
member this.IdleTimeout : TimeSpan with get, set
Public Property IdleTimeout As TimeSpan
屬性值
一個 TimeSpan 表示閒置時間的數值。 預設值為無限,對應時間 範圍(TimeSpan.MaxValue)。
- 屬性
範例
以下程式碼範例說明如何存取該 IdleTimeout 物業。
// Get the current IdleTimeout property value.
TimeSpan idleTimeout =
processModelSection.IdleTimeout;
// Set the IdleTimeout property to TimeSpan.Parse("12:00:00").
processModelSection.IdleTimeout =
TimeSpan.Parse("12:00:00");
' Get the current IdleTimeout property value.
Dim idleTimeout As TimeSpan = _
processModelSection.IdleTimeout
' Set the IdleTimeout property to TimeSpan.Parse("12:00:00").
processModelSection.IdleTimeout = _
TimeSpan.Parse("12:00:00")
備註
當 IdleTimeout 達到物業價值時,工人程序會重新啟動(跳出)。 預設情況下,只有兩個條件會導致程序跳出:程序超過允許的記憶體限制,或程序超過允許排隊的請求數。 你可以在預設條件中加入其他條件。 例如,你可以利用該 IdleTimeout 屬性限制工人程序閒置的時間。