Capturing Request Stream

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Capturing Request Stream

    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


    PJ Guest

  2. Similar Questions and Discussions

    1. Handling Object Stream / Cross Ref stream in PDF 1.4
      Hi, My PDF Application handles only PDF spec 1.4 and when my Application process a PDF file generated with Acrobat ~ PDF 1.6, I see some Cross...
    2. Capturing live video stream from an IP Cam with FlashCom
      I want to broadcast live video stream on to a website using Flash Communication Server. I have achieved this with normal Webcam. Because of the...
    3. Capturing StdIN request from another server
      Dear All, I am currently working with a company called brainstorm who are providing som MMS features for me. They receive the message and then...
    4. Capturing StdlN request from another server
      Are you using <CFHTTP></CFHTTP>?
    5. Can't get request stream in increments - only after all sent from client
      Hello all - I'm working an a SoapExtension to implement the SOAP with Attachments protocol. Here's a Google thread from the MS newsgroups...
  3. #2

    Default Re: Capturing Request Stream

    Or you must go through the pain of writing an ISAPI filter...


    --
    MARK TRUDGEON
    [email]fzjr4n@unison.ie[/email]

    This posting is provided "as is", with no warranties, and confers no rights.


    "Natty Gur" <natty@dao2com.com> wrote in message
    news:uIZHS6BTDHA.2148@TK2MSFTNGP11.phx.gbl...
    > Hi,
    >
    > Is the Request.InputStream holds that data ?
    >
    > Natty Gur, CTO
    > Dao2Com Ltd.
    > 28th Baruch Hirsch st. Bnei-Brak
    > Israel , 51114
    >
    > Phone Numbers:
    > Office: +972-(0)3-5786668
    > Fax: +972-(0)3-5703475
    > Mobile: +972-(0)58-888377
    >
    > Know the overall picture
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    fzjr4n Guest

  4. #3

    Default Re: Capturing Request Stream

    You can override the Render method of your page object and get the final
    output from there.
    Here's more info:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuicontrolclassrendertopic.asp[/url]

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]


    "PJ" <pjwal@hotmail.com> wrote in message
    news:el2qZ%23$SDHA.3188@tk2msftngp13.phx.gbl...
    > 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
    >
    >

    Steve C. Orr, MCSD Guest

  5. #4

    Default Re: Capturing Request Stream

    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

    "Steve C. Orr, MCSD" <Steve@Orr.net> wrote in message
    news:uZSsCHCTDHA.2120@TK2MSFTNGP11.phx.gbl...
    > You can override the Render method of your page object and get the final
    > output from there.
    > Here's more info:
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuicontrolclassrendertopic.asp[/url]
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > [url]http://Steve.Orr.net[/url]
    >
    >
    > "PJ" <pjwal@hotmail.com> wrote in message
    > news:el2qZ%23$SDHA.3188@tk2msftngp13.phx.gbl...
    > > 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
    > >
    > >
    >
    >

    PJ Guest

  6. #5

    Default Re: Capturing Request Stream

    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...

    "fzjr4n" <fzjr4n@unison.ie> wrote in message
    news:eFNqXECTDHA.2120@TK2MSFTNGP11.phx.gbl...
    > Or you must go through the pain of writing an ISAPI filter...
    >
    >
    > --
    > MARK TRUDGEON
    > [email]fzjr4n@unison.ie[/email]
    >
    > This posting is provided "as is", with no warranties, and confers no
    rights.
    >
    >
    > "Natty Gur" <natty@dao2com.com> wrote in message
    > news:uIZHS6BTDHA.2148@TK2MSFTNGP11.phx.gbl...
    > > Hi,
    > >
    > > Is the Request.InputStream holds that data ?
    > >
    > > Natty Gur, CTO
    > > Dao2Com Ltd.
    > > 28th Baruch Hirsch st. Bnei-Brak
    > > Israel , 51114
    > >
    > > Phone Numbers:
    > > Office: +972-(0)3-5786668
    > > Fax: +972-(0)3-5703475
    > > Mobile: +972-(0)58-888377
    > >
    > > Know the overall picture
    > >
    > >
    > > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > > Don't just participate in USENET...get rewarded for it!
    >
    >

    PJ Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139