The maximum default value of the script runtime is 90 seconds, which is to prevent unlimited loops from being used very useful to protect.
However, in some special occasions, you may face the script running time than 90 seconds, for example, when your script generates a very huge home page, you must not want the homepage to have a limit time. . Then you can use the ScriptTimeout property of the Server object to set your desire to limit the restriction time. For example, the next example:
<% Server.scripttimeout = 150%>
<%
Randomize
Starx = 60
Fork = 1 to 10
Nextsecond = dateadd ("s", 10, time)
Do While Time loop StarX = StarX 3 * RND () - 1 For i = 1 to StarX Response.write ("& ndsp;") NEXT Response.write ("* ") NEXT %> body> html> This script will show a slow star, and an asterisk is displayed every 10 seconds. This script may be ended normally since the page is limited to the limit time of 150 seconds. You can also use the server.scripttimeout property to reduce the limit time within 90 seconds, and you can modify the ScriptTimeout property in the App Options page in the Application Configuration dialog box in the Internet service Manager, if you change it to- 1, then your script will never expire. Allow scripts to create a very important pipe for a long time, in fact, a script may execute the user who is executing to execute a request has left, this case, this script Continue to perform is not good for anyone. Fortunately, the properties of the response object can be helpful, and the isclientConnected property can check if the browser and the server are still connected. You can use this property to stop executing the script that the user has left. For example, the following example will always display the connection termination.
<%
While 1 = 1
Response.write ("Hello! Magicw3 COM.")
If NOT RESPONSE.ISCLIENTCONNECTED THEN RESPONSE.END
Wend
%>
body>
Html>
Note that the iSclientConnected property is only valid when the browser is still connected when the last response.write is called. If you have run a long running script without output anything, then this property will not work.