ScriptTimeout Property
Collapse the table of content
Expand the table of content

HttpServerUtility.ScriptTimeout Property


Gets and sets the request time-out value in seconds.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

public int ScriptTimeout {
	[AspNetHostingPermissionAttribute(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Medium)]

Property Value

Type: System.Int32

The time-out value setting for requests.

Exception Condition

The current HttpContext is null.


The time-out period is null or otherwise could not be set.

The ScriptTimeout property can be set in the Web.config file by setting the executionTimeout attribute of the element. Setting the time-out programmatically with the ScriptTimeout property takes precedence over the Web.config setting.


If you set the debug attribute of the element to true in the Web.config file, the value of ScriptTimeout will be ignored.

The following example sets the request time-out period to 60 seconds.

Server.ScriptTimeout = 60;

.NET Framework
Available since 1.1
Return to top
© 2016 Microsoft