HostingEnvironmentSection.IdleTimeout 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定卸載非活躍應用程式前的時間(以分鐘計)。
public:
property TimeSpan IdleTimeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesOrInfiniteConverter))]
[System.Configuration.ConfigurationProperty("idleTimeout", DefaultValue="10675199.02:48:05.4775807")]
[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")]
public TimeSpan IdleTimeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesOrInfiniteConverter))>]
[<System.Configuration.ConfigurationProperty("idleTimeout", DefaultValue="10675199.02:48:05.4775807")>]
[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")>]
member this.IdleTimeout : TimeSpan with get, set
Public Property IdleTimeout As TimeSpan
屬性值
A TimeSpan 是指卸載非活躍應用程式前指定的分鐘數。
- 屬性
範例
以下程式碼範例說明如何使用該 IdleTimeout 屬性。 此程式碼範例是本類別更大範例 HostingEnvironmentSection 的一部分。
// Display IdleTimout property
Console.WriteLine("Idle Timeout: {0}", configSection.IdleTimeout);
' Display the IdleTimout property
Console.WriteLine("Idle Timeout: {0}", configSection.IdleTimeout)
備註
該屬性的 IdleTimeout 預設值為「無限」。 此設定可在機器或應用程式層級設定。 若此設定在其他層級定義,則忽略。