HostingEnvironmentSection.IdleTimeout 屬性

定義

取得或設定卸載非作用中應用程式之前的時間長度,以分鐘為單位。

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

屬性值

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 預設值為 「Infinite」。 您可以在電腦或應用層級設定此設定。 如果在任何其他層級定義此設定,則會忽略此設定。

適用於