I
info
Hi.
I try to download very large file using ASP and BinaryWrite. But ASP
+W3WP allocates a lot of memory. I write the file using blocks. It
works great in IIS4 and 5, does not work in IIS 6.
Sample code causing the error is bellow. The code writes 100000B
blocks, with buffer=false, but it allocates 1GB of memory, not 10kB as
expected!
Thank you for help
Antonin
<%
Const BlockSize = 100000
Const DownloadSize = 1000000000
Dim BlockData, BlockCounter
BlockData = space(BlockSize/2)
'Switch off buffer.
Response.Buffer = False
'This is download
Response.ContentType = "application/x-msdownload"
For BlockCounter = 1 To DownloadSize Step BlockSize
Response.BinaryWrite BlockData
Next
%>
I try to download very large file using ASP and BinaryWrite. But ASP
+W3WP allocates a lot of memory. I write the file using blocks. It
works great in IIS4 and 5, does not work in IIS 6.
Sample code causing the error is bellow. The code writes 100000B
blocks, with buffer=false, but it allocates 1GB of memory, not 10kB as
expected!
Thank you for help
Antonin
<%
Const BlockSize = 100000
Const DownloadSize = 1000000000
Dim BlockData, BlockCounter
BlockData = space(BlockSize/2)
'Switch off buffer.
Response.Buffer = False
'This is download
Response.ContentType = "application/x-msdownload"
For BlockCounter = 1 To DownloadSize Step BlockSize
Response.BinaryWrite BlockData
Next
%>