共用方式為


HttpRuntimeSection.ShutdownTimeout 屬性

定義

取得或設定終止應用程式之前允許它閒置的時間長度。

public:
 property TimeSpan ShutdownTimeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))]
[System.Configuration.ConfigurationProperty("shutdownTimeout", DefaultValue="00:01:30")]
public TimeSpan ShutdownTimeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))>]
[<System.Configuration.ConfigurationProperty("shutdownTimeout", DefaultValue="00:01:30")>]
member this.ShutdownTimeout : TimeSpan with get, set
Public Property ShutdownTimeout As TimeSpan

屬性值

TimeSpan 值,表示終止應用程式之前允許它閒置的時間長度。

屬性

範例

下列範例將示範如何使用 ShutdownTimeout 屬性。

// Get the ShutdownTimeout property value.
Response.Write("ShutdownTimeout: " +
  configSection.ShutdownTimeout.ToString() + "<br>");

// Set the ShutdownTimeout property value to 2 minutes.
configSection.ShutdownTimeout = TimeSpan.FromMinutes(2);
' Get the ShutdownTimeout property value.
Response.Write("ShutdownTimeout: " & _
  configSection.ShutdownTimeout.ToString() & "<br>")

' Set the ShutdownTimeout property value to 2 minutes.
configSection.ShutdownTimeout = TimeSpan.FromMinutes(2)

備註

屬性 ShutdownTimeout 表示應用程式正常關閉之前的時間量。 預設值為 90 秒。

適用於