HttpServerUtility.ScriptTimeout HttpServerUtility.ScriptTimeout HttpServerUtility.ScriptTimeout HttpServerUtility.ScriptTimeout Property

定義

取得或設定要求的逾時值 (以秒為單位)。Gets or sets the request time-out value in seconds.

public:
 property int ScriptTimeout { int get(); void set(int value); };
public int ScriptTimeout { get; set; }
member this.ScriptTimeout : int with get, set
Public Property ScriptTimeout As Integer

屬性值

要求的逾時值設定。The time-out value setting for requests.

例外狀況

逾時期間為 null,否則不能被設定。The time-out period is null or otherwise could not be set.

範例

下列範例會設定為 60 秒的要求逾時期限。The following example sets the request time-out period to 60 seconds.

Server.ScriptTimeout = 60;
   
Server.ScriptTimeout = 60
   

備註

ScriptTimeout可以在 Web.config 檔案中設定屬性,藉由設定executionTimeout屬性httpRuntime項目。The ScriptTimeout property can be set in the Web.config file by setting the executionTimeout attribute of the httpRuntime element. 設定的逾時以程式設計方式用ScriptTimeout屬性會優先於 Web.config 設定。Setting the time-out programmatically with the ScriptTimeout property takes precedence over the Web.config setting.

注意

如果您設定debug的屬性httpRuntime項目true在 Web.config 檔案中,值ScriptTimeout將會被忽略。If you set the debug attribute of the httpRuntime element to true in the Web.config file, the value of ScriptTimeout will be ignored.

適用於