Your problem is a lot deeper than you think, as the binary stream contains a
whole bunch of data that forms part of RFC 1867 for uploading multipart form
data from a web browser. So you have to parse the stream before you can
even begin to pick out the part you need containing the file for any other
submitted form data, and if your boundaries are wrong your file will be
corrupted along with ther rest of your http submission.
Take a look at what others have done as a starting point to get an idea of
what it involves.
http://www.asp.net/ControlGallery/Co...791&tabindex=0
Me- I would buy one of the existing ones, for what they cost its not worth
the work these days.
--
Regards
John Timney
Microsoft MVP
"Michael Kolias" <mi***@alspaconsulting.com> wrote in message
news:aK******************************@speakeasy.ne t...
Hello everyone and happy holidays!
I have a situation where I want to parse on the fly a stream of binary
data.
I am developing an httpmodule for asp.net for file uploading.
I do not whant to use the built-in control because it's inadequate.
In theory I would use a que and feed data as it comes in and then have
a parser that extracts the data from the que, parse them and do whatever.
The problem here is that I am dealing with raw binary data that sometimes
could
be hunderds of megabytes.
Should I use the built-in que class and store the data byte by byte?
How would someone go on creating a first-in first-out buffer of bytes with
managed code?
Michael.