Click to See Complete Forum and Search --> : ASPSmartUpload


suzis
01-17-2006, 11:29 PM
have successfully set up and used the component ASPSmartUpload to upload small files to my server. Recently, when I tried to upload a file 2.5 mg in size I received the error message:

Active Server Pages error “ASP 0113’
Script timed out
/Upload/ECN/smartupload.asp

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.

My research indicates that the following line of code might correct this problem.

Server.ScriptTimeout = 900

Just inserting this line into the following code was not effective. What is the proper way to incorporate this line of code? Do I need a “var”, a “set” or % % around the code.

Advice would be greatly appreciated.

<HTML>

<BODY BGCOLOR="white">

<H2>E&C News Big Game Display Contest FTP</H2>

<HR>

<%

' Variables

' *********

Dim mySmartUpload

Dim intCount


' Object creation

' ***************

Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload"

' Upload

' ******

mySmartUpload.Upload

Server.ScriptTimeout=900

' Save the files with their original names in a virtual path of the web server

' ****************************************************************************

intCount = mySmartUpload.Save("D:\inetpub\ebmpubs5\Upload\ECN\BigGame")

' sample with a physical path

' intCount = mySmartUpload.Save("C:\Accounts\healthy\wwwRoot\PDF\")


' Display the number of files uploaded

' ************************************

Response.Write(intCount & " file(s) has been uploaded. Thank You!.")

%>

</BODY>
</HTML>

ProWeb
01-19-2006, 09:33 AM
Hi

It appears that Win 2003 Server has limitations on file uploads.
Check out http://support.jodohost.com/showthread.php?t=5653

Bullschmidt
01-23-2006, 08:27 PM
And can increase the timeout for the particular page as you see fit perhaps to even more than 90 seconds:
' Script timeout in seconds for this page.
' (60 x 60 = 1 hour.)
Server.ScriptTimeout = 60 * 60

But you may also have to request that your Web host increase the maximum filesize allowed.