Vista, Classic ASP, VB6 Response.BinaryWrite Problem
am 26.07.2007 00:50:08 von MichaelPyles
I have a legacy ASP app that works fine on IIS 5.1 and 6.0. In one case,
theASP calls a VB6 COM dll to stream binary data in response to an HTTP
request to resolve an HTML SRC tag. I have two test cases: streaming files
less than 5K in size and streaming files greater than 20K in size. Things
work fine for the small files (~5K), but not the larger ones (~23K). I do
one large BinaryWrite into the ASP buffer for the entire file. Using
Ethereal, it appears no file data is returned to the browser for the larger
files. I tried breaking the binary writes up into chunks that were 4K in
size with no success.
The same web app also streams files using a C++ COM component. That C++
component does the same thing the VB component does except it always calls
BinaryWrite using 4K blocks. It works great.
This all works on XP, IIS 5.1, but not Vista, IIS7. It looks like there is
some sort of bug when using Response.Write from a VB6 COM Component if the
size of the data exceeds some value that must lie between 5 and 23K (I didn't
try to experiment to pin down the exact size limitation). Is this a know
problem?
Re: Vista, Classic ASP, VB6 Response.BinaryWrite Problem
am 27.07.2007 10:30:17 von Egbert Nierop
"MichaelPyles" wrote in message
news:46CCC361-90DD-4543-8B49-064772C74768@microsoft.com...
>I have a legacy ASP app that works fine on IIS 5.1 and 6.0. In one case,
> theASP calls a VB6 COM dll to stream binary data in response to an HTTP
> request to resolve an HTML SRC tag. I have two test cases: streaming
> files
> less than 5K in size and streaming files greater than 20K in size. Things
> work fine for the small files (~5K), but not the larger ones (~23K). I
> do
> one large BinaryWrite into the ASP buffer for the entire file. Using
> Ethereal, it appears no file data is returned to the browser for the
> larger
> files. I tried breaking the binary writes up into chunks that were 4K in
> size with no success.
> The same web app also streams files using a C++ COM component. That C++
> component does the same thing the VB component does except it always calls
> BinaryWrite using 4K blocks. It works great.
> This all works on XP, IIS 5.1, but not Vista, IIS7. It looks like there
> is
> some sort of bug when using Response.Write from a VB6 COM Component if the
> size of the data exceeds some value that must lie between 5 and 23K (I
> didn't
> try to experiment to pin down the exact size limitation). Is this a know
> problem?
Hi Michael,
If you use the IResponse interface in VB6 as well, you can exactly be sure,
that the same code footprint is walked through in ASP as through C++.
Probably, in VB6, the variant having data, is not a binary array, while VB6
' forgives' such a syntactical bug, in C++ you would not quickly sent the
wrong data.
So, my question is, is the type of Variant that Response.BinaryWrite writes,
really of VT_ARRAY | VT_UI8 ? (vbArray Or vbByte)