You Are Here: Home » Articles » How-To » Programming » Tech » Web

How to change the timeout value of an ASP script?

By on May 21st, 2009 
Advertisement

asp logoASP Scripting Language has a default timeout value set by the IIS Server Admin so that scripts can be automatically terminated after a particular amount of time in case they go out of bounds or start behaving erratically. This is indeed a very good feature and can stop the ASP script from consuming the server's entire RAM in case things go out of bound.

But at times you need to write scripts that will by default take long time to fulyy execute. If this execution time is larger than the timeout value for ASP script execution, then your script will be terminated by the server even before it can completely execute.

In order to avoid this, we can temporarily change the script execution timeout value. To do this simply assign a value to the Server.ScriptTimeout property inside the ASP directives at the beginning of your ASP Script. The assignment acn be any numeric value which implies time in seconds. For instance, if want to change the time out value to 300 seconds then we should inlude the following code in our script:

<%
Server.ScriptTimeout=300 'Sets TimeOut value to 300 seconds
%>

If you want to find the current TimeOut value on your server for ASP script execution then you can simply use this code:

<%
response.write(Server.ScriptTimeout) 'Prints the current TimeOut value
%>

Technorati Tags: , , ,

Advertisement



Related Posts by Tags: , , ,





How to change the timeout value of an ASP script? was originally published on Digitizor.com on May 21, 2009 - 6:07 pm (Indian Standard Time)