"Joseph Geretz" <jg*****@nospam.comwrote in message
news:eh**************@TK2MSFTNGP06.phx.gbl...
I've attached a screen-shot of my call stack. I'm hoping you can explainI would suggest that you get Reflector and take a look at the code.
this to me.
The innermost method on this stack is SRSeRx.HTTPReqFilter.Read.
HTTPReqFilter inherits from System.IO.Stream and is installed as a filter
on the current Request obejct. However, I'm curious to understand how I
got here at this specific point, because according to what I understand
(which admittedly is lacking in this area) I don't think I should be here.
The most recent line of code executing within my application is
highlighted in green:
Stream S = httpCtx.Request.InputStream;
This is a simple object reference assignment.
So why in the world does this trigger the Read method on the Request
filter which is installed on this Request object?? In the immortal words
of John Paul Jones - 'I have not yet begun to read!' (I note of course the
item in the call stack - [External Code]. Something is reading from the
Request at this point, but it's not me!
To add insult to injury, when I subsequently get to the line where I do
actually read from the Request.InputStream -
S.Read(buffer, 0, Len);
At that point I *don't* trigger the filter Read method and that's the very
processing point where I need to! So what's going on here?
Thanks very much for any advice which you can provide!
But I bet it calls you because there is a filter installed. Either that, or
it wants to start buffering the data. If the buffer is empty at the time you
reference InputStream, it starts to fill the buffer.
--
John Saunders | MVP - Connected System Developer