Script timed out Message added to Binary File End

Script timed out Message added to Binary File End

am 04.05.2006 18:04:37 von Prabhat Nath

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:
---------------------------------------------
.

Active Server Pages size=2>error 'ASP 0113'.

.Script timed
out
.

. size=2>/Roctek/ProcessDownload.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..

----------------------------------------------

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("

Requested file does not exists! Please contact Roctek
Support.

")
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