BinaryWrite and w3wp.exe memory leak

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
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top