P
Prabhat
Hi Friends,
I have code that will "BinaryWrite" a EXE file of 20mb to client using the
ADO Stream. After the download the EXE file works fine without any problem.
When I verified the EXE that gets downloaded to client machine that EXE has
the below text added to the bottom:
---------------------------------------------
<font face="Arial" size=2>.<p>Active Server Pages</font> <font face="Arial"
size=2>error 'ASP 0113'</font>.<p>.<font face="Arial" size=2>Script timed
out</font>.<p>.<font face="Arial"
size=2>/Roctek/ProcessDownload.asp</font>.<p>.<font face="Arial" size=2>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..</font>
----------------------------------------------
So I can see that it is a Script TimeOut Error. So can you please guide me
where the problem is comming and how can I rectify this. (Including the ASP
code that BinaryWrite the file)
---------------------------------------------
Function DownloadFile(strFilename)
dim stFile
Response.Buffer = True
Response.Clear
Set stFile = Server.CreateObject("ADODB.Stream")
stFile.Open
stFile.Type = 1 'Set as BINARY
On Error Resume Next
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if not fso.FileExists(strFilename) then
Response.Write("<h1>Requested file does not exists! Please contact Roctek
Support.</h1><P>")
Response.End
end if
Set fFile = fso.GetFile(strFilename)
iFileLength = fFile.Size
stFile.LoadFromFile(strFilename)
Response.AddHeader "Content-Disposition", "attachment; filename=" &
fFile.Name
Response.AddHeader "Content-Length", iFileLength
Response.Charset = "UTF-8"
Response.ContentType = "application/octet-stream"
Response.BinaryWrite stFile.Read
Response.Flush
Response.Buffer = False
Response.Clear
Set fso = Nothing
Set fFile = Nothing
stFile.Close
Set stFile = Nothing
End Function
-----------------------------------------------------------
I am using IIS 5 on Windows 2000 Server. Please guide me to solve the
problem
Thanks
Prabhat
I have code that will "BinaryWrite" a EXE file of 20mb to client using the
ADO Stream. After the download the EXE file works fine without any problem.
When I verified the EXE that gets downloaded to client machine that EXE has
the below text added to the bottom:
---------------------------------------------
<font face="Arial" size=2>.<p>Active Server Pages</font> <font face="Arial"
size=2>error 'ASP 0113'</font>.<p>.<font face="Arial" size=2>Script timed
out</font>.<p>.<font face="Arial"
size=2>/Roctek/ProcessDownload.asp</font>.<p>.<font face="Arial" size=2>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..</font>
----------------------------------------------
So I can see that it is a Script TimeOut Error. So can you please guide me
where the problem is comming and how can I rectify this. (Including the ASP
code that BinaryWrite the file)
---------------------------------------------
Function DownloadFile(strFilename)
dim stFile
Response.Buffer = True
Response.Clear
Set stFile = Server.CreateObject("ADODB.Stream")
stFile.Open
stFile.Type = 1 'Set as BINARY
On Error Resume Next
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if not fso.FileExists(strFilename) then
Response.Write("<h1>Requested file does not exists! Please contact Roctek
Support.</h1><P>")
Response.End
end if
Set fFile = fso.GetFile(strFilename)
iFileLength = fFile.Size
stFile.LoadFromFile(strFilename)
Response.AddHeader "Content-Disposition", "attachment; filename=" &
fFile.Name
Response.AddHeader "Content-Length", iFileLength
Response.Charset = "UTF-8"
Response.ContentType = "application/octet-stream"
Response.BinaryWrite stFile.Read
Response.Flush
Response.Buffer = False
Response.Clear
Set fso = Nothing
Set fFile = Nothing
stFile.Close
Set stFile = Nothing
End Function
-----------------------------------------------------------
I am using IIS 5 on Windows 2000 Server. Please guide me to solve the
problem
Thanks
Prabhat