Hi!
I want to use ASP to download big files using ADODB.STREAM. It works very fine with files smaller than 80 MB.
On the Webserver I can see that memory allocation and the process w3wp is running. After some time (more or less 2 minutes) I get a response timeout.
Here is the code:
Server.ScriptTimeout = 30000
Response.Buffer = True
Response.Clear
Response.Expires = 0
Response.ContentType = "Download-File"
Response.AddHeader "Content-Disposition","attachment; filename=" & sfile
Set oStream = Server.CreateObject("ADODB.Stream")
oStream.Type = adTypeBinary
oStream.Open
oStream.LoadFromFile(sfile)
Response.AddHeader "Content-Length", oStream.Size ' -- Schönheit
Response.CharSet = "UTF-8"
For i = 0 To oStream.Size
i = i + 128000
Response.BinaryWrite(oStream.Read(128000))
Response.Flush
Next
oStream.Close
Set oStream = Nothing
Response.Flush
Response.End
Do I have to change something in my code - or perhaps a general setting in IIS / the metabase?
Many thanks in advance
Ruben
I want to use ASP to download big files using ADODB.STREAM. It works very fine with files smaller than 80 MB.
On the Webserver I can see that memory allocation and the process w3wp is running. After some time (more or less 2 minutes) I get a response timeout.
Here is the code:
Server.ScriptTimeout = 30000
Response.Buffer = True
Response.Clear
Response.Expires = 0
Response.ContentType = "Download-File"
Response.AddHeader "Content-Disposition","attachment; filename=" & sfile
Set oStream = Server.CreateObject("ADODB.Stream")
oStream.Type = adTypeBinary
oStream.Open
oStream.LoadFromFile(sfile)
Response.AddHeader "Content-Length", oStream.Size ' -- Schönheit
Response.CharSet = "UTF-8"
For i = 0 To oStream.Size
i = i + 128000
Response.BinaryWrite(oStream.Read(128000))
Response.Flush
Next
oStream.Close
Set oStream = Nothing
Response.Flush
Response.End
Do I have to change something in my code - or perhaps a general setting in IIS / the metabase?
Many thanks in advance
Ruben