
ScriptTimeout | 387
ServerUtility
Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Example
This code example declares a string variable, assigns the MachineName property
value to the string variable, and then sets the text property of the Message label to
the value of ServerName:
Sub Page_Load( )
Dim ServerName As String
ServerName = Server.MachineName
Message.Text = "The name of the server is " & ServerName & ".<br/>"
End Sub
Notes
This property can be useful for code that needs to be easily portable, but needs to
access resources that require the server name.
ScriptTimeout
intvar = Server.ScriptTimeout
Returns an integer containing the length, in milliseconds, a request is allowed to
run before timing out.
Parameters
intvar
An integer variable that receives the script timeout value.
Example
This code example declares an integer variable, sets the ScriptTimeout value to
120 milliseconds, assigns the ScriptTimeout property value to the variable, and
then sets the text property of the Message label to the value of the variable:
Sub Page_Load( )
Dim Timeout As String
Server.ScriptTimeout = 120
Timeout = CStr(Server.ScriptTimeout)
Message.Text = "The current ScriptTimeout value is " & _
Timeout & ".<br/>"
End Sub
Notes
You can use this property to extend or reduce the timeout value in order to allow
longer-running processes time to complete, ...