Поделиться через


Server.ScriptTimeout

The ScriptTimeout property specifies the maximum amount of time that a script can run before it is terminated.

The timeout will not take effect while a server component is processing.

Syntax

Server.ScriptTimeout = NumSeconds

Parameters

  • NumSeconds
    Specifies the maximum number of seconds that a script can run before the server terminates it. The default value is 90 seconds.

Applies To

Server Object

Remarks

A default ScriptTimeout can be set for a Web service or Web server by using the AspScriptTimeout metabase property. The ScriptTimeout property cannot be set to a value less than that specified in the metabase. For example, if NumSeconds is set to 10, and the metabase setting contains the default value of 90 seconds, scripts will time out after 90 seconds. However, if NumSeconds were set to 100, the scripts would time out after 100 seconds.

For more information about using the metabase, see Using the IIS ADSI Provider.

Example Code

The following example causes scripts to time out, if the server takes longer than 100 seconds to process them:

<% Server.ScriptTimeout = 100 %> 

The following example retrieves the current value of the ScriptTimeout property and stores it in the variable TimeOut.

<% TimeOut = Server.ScriptTimeout %> 

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

See Also