Capturing Request Stream

  • Thread starter Thread starter PJ
  • Start date Start date
P

PJ

I would like to capture a request stream before the request has been
completely sent to the server for the sake of saving the bytes of a posted
file to disk. I have written httpmodules before, but (correct me if I am
wrong) it seems that by the ProcessRequest event, the Request has been
completely sent and aspnet_wp has used it to hydrate the httpcontext
instance.

Is there a .net way of capturing an http request as it comes in to the
server? Do I have to write an httpapplication for this or something? If
anyone could point me in the right direction ( w/out trying to sell me some
3rd party assembly ), I would appreciate it.

~TIA
 
I'm not trying to get the output stream...I want to get the input stream of
the Request as it arrives and before it fully arrives so as take byte[]
chunks of a posted gigabyte file and save them to disk.

context.Request.Files[0].InputStream

Can someone tell me if I can get access to the InputStream before the
request has been fully posted to the server?

thx
 
yep, i know it can be done w/ a c++ asapi filter, but i'm pretty sure it can
be done in managed code as well...
 
Back
Top