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.ScriptTi meout = 30000
Response.Buffer = True
Response.Clear
Response.Expire s = 0
Response.Conten tType = "Download-File"
Response.AddHea der "Content-Disposition","a ttachment; filename=" & sfile
Set oStream = Server.CreateOb ject("ADODB.Str eam")
oStream.Type = adTypeBinary
oStream.Open
oStream.LoadFro mFile(sfile)
Response.AddHea der "Content-Length", oStream.Size ' -- Schönheit
Response.CharSe t = "UTF-8"
For i = 0 To oStream.Size
i = i + 128000
Response.Binary Write(oStream.R ead(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
Juan
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.ScriptTi meout = 30000
Response.Buffer = True
Response.Clear
Response.Expire s = 0
Response.Conten tType = "Download-File"
Response.AddHea der "Content-Disposition","a ttachment; filename=" & sfile
Set oStream = Server.CreateOb ject("ADODB.Str eam")
oStream.Type = adTypeBinary
oStream.Open
oStream.LoadFro mFile(sfile)
Response.AddHea der "Content-Length", oStream.Size ' -- Schönheit
Response.CharSe t = "UTF-8"
For i = 0 To oStream.Size
i = i + 128000
Response.Binary Write(oStream.R ead(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
Juan
Comment