<tedqn RemoveThis @yahoo.com> wrote in message
news:1137912447.565104.248660@g47g2000cwa.googlegroups.com...
> Are you sure? If disabling buffer would work for upload/download, I'd
> be more than happy to do it instead of modifying the buffer limit.
> Other people suggested breaking the data into smaller chunks and run a
> loop..
>
They are right.
(b.t.w. ISAPI 6.0 for IIS6 allows a specific extension to upload/download,
it does not cache and it does not exhaust resources as -all- other previous
methods do)
You should do it in chunks of say 4096 bytes.
And disable the buffering for the specific page
sample:
Response.Buffer = false
'Set the content type to the specific type that you are sending.
Response.ContentType = "application/x-zip-compressed" 'or use your own
content type here...
Dim strFilePath, lSize, lBlocks
Const CHUNK = 2048
set objStream = CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
objStream.LoadFromFile strFilePath
lSize = objStream.Size
Response.AddHeader "Content-Length", lSize
lBlocks = 1
For lBlocks = lBlocks To lSize \ CHUNK
If Response.IsClientConnected = False Then Exit For
Response.BinaryWrite objStream.Read(CHUNK)
Next
lSize = lSize MOD CHUNK
If lSize > 0 And Response.IsClientConnected = True Then
Response.BinaryWrite objStream.Read(lSize)
End If
objStream.Close
>> Stay informed about: AspBufferingLimit and impact on server performance