Maximum Execution time by Server.ScriptTimeout

Script execution time of any page can be set by using Server.ScriptTimeout value. This value by default is set to 90 seconds. We can read this maximum script execution time by this.

response.write(Server.ScriptTimeout)

We can change the above value like this.

Server.ScriptTimeout=10

By keeping this value at a lower level we can create some delays by writing some for loops.

Server.ScriptTimeout=1
response.write(Server.ScriptTimeout)

Dim i
For i=1 to 100000000
Next
Response.Write "<br>Done ...<br>"

This way we will create some delays and once it exceeds the ScriptTimeout value then we will get this error message.

Error Type:
Active Server Pages, ASP 0113 (0x80004005)
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
/a/server/scripttimeout.asp

Be the first to post comment on this article :




Google+

Post Comment This is for short comments only. Use the forum for more discussions.




HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2015 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer