Hi Friends,
I have code that will "BinaryWrit e" 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>Acti ve 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.ScriptTi meout
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(st rFilename)
dim stFile
Response.Buffer = True
Response.Clear
Set stFile = Server.CreateOb ject("ADODB.Str eam")
stFile.Open
stFile.Type = 1 'Set as BINARY
On Error Resume Next
Set fso = Server.CreateOb ject("Scripting .FileSystemObje ct")
if not fso.FileExists( strFilename) then
Response.Write( "<h1>Reques ted file does not exists! Please contact Roctek
Support.</h1><P>")
Response.End
end if
Set fFile = fso.GetFile(str Filename)
iFileLength = fFile.Size
stFile.LoadFrom File(strFilenam e)
Response.AddHea der "Content-Disposition", "attachment ; filename=" &
fFile.Name
Response.AddHea der "Content-Length", iFileLength
Response.Charse t = "UTF-8"
Response.Conten tType = "applicatio n/octet-stream"
Response.Binary Write 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 "BinaryWrit e" 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>Acti ve 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.ScriptTi meout
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(st rFilename)
dim stFile
Response.Buffer = True
Response.Clear
Set stFile = Server.CreateOb ject("ADODB.Str eam")
stFile.Open
stFile.Type = 1 'Set as BINARY
On Error Resume Next
Set fso = Server.CreateOb ject("Scripting .FileSystemObje ct")
if not fso.FileExists( strFilename) then
Response.Write( "<h1>Reques ted file does not exists! Please contact Roctek
Support.</h1><P>")
Response.End
end if
Set fFile = fso.GetFile(str Filename)
iFileLength = fFile.Size
stFile.LoadFrom File(strFilenam e)
Response.AddHea der "Content-Disposition", "attachment ; filename=" &
fFile.Name
Response.AddHea der "Content-Length", iFileLength
Response.Charse t = "UTF-8"
Response.Conten tType = "applicatio n/octet-stream"
Response.Binary Write 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
Comment