Script Timeout

Active Server Pages sets a limit for the amount of time that a given page can execute. The rational is that if a page is taking too long to execute and return results, the user will get frustrated and press the browser's Stop button.

By default with both IIS 3 and IIS 4, this timeout is set to 90 seconds. However, in the case of a file upload, the page must execute for the duration of the upload. If your user is transferring information over a slow line or is transferring a large quantity of information, it is easy to exceed this limit.

With IIS 3, this limit is adjustable for the entire web server only. With IIS 4 it is possible to set the timeout for the entire server, a virtual server, or a specific application. To set the Script Timeout for a single page, ASP has the Server.ScriptTimeout property.

If you have have only a few pages that perform uploads, use the Server.ScriptTimeout property. If you have many pages, change the appropriate server settings.

To set the Script Timeout:

By ASP Script:

Use the Session.Timeout property within your ASP script, i.e.

   <% Server.ScriptTimeout = 3600 %>

With IIS3: Edit the Registry using REGEDT32. Modify the following value:

HKEY_LOCAL_MACHINE\

   SYSTEM\

       CurrentControlSet\

           Services\

               W3SVC\

                   ASP\

                       Parameters\

                           ScriptTimeout

Double-click this value, and set the Radix to decimal. You can now enter an appropriate value in seconds. For example, 3600 seconds is equivalent to one hour.

With IIS4: Using the Microsoft Management Console, select your web application that will perform uploads. Right-click to select the properties. From the Properties dialog, click on the "Configuration" button. Choose the "App Options" tab. Set the "ASP Script Timeout" to the desired number of seconds. For example, 3600 seconds is equivalent to one hour.