locked
httpWorkerRequest.ReadEntityBody() is driving me crazy. RRS feed

  • Question

  • User-177035943 posted
    I am trying to write a httpModule that will process file uploads but I can't
    get httpWorkerRequest.GetPreloadedEntityBody() or
    httpWorkerRequest.ReadEntityBody()
    to work!

    Thanks

    - Will


    httpWorkerRequest.GetPreloadedEntityBody() (returns 0 bytes on WinXP VS2005 and a few bytes on IIS 6.0)
    httpWorkerRequest.ReadEntityBody() (always returns 0 bytes no matter the server or browser)

    httpWorkerRequest.HasEntityBody() (looks good)
    httpWorkerRequest.GetTotalEntityBodyLength() (looks good)
    httpWorkerRequest.IsEntireEntityBodyIsPreloaded() (looks good)


    The httpModule in pseudo code:

    1)  My BeginRequest() is called (works).

    2) My IsUploadRequest() (works).

    3) httpWorkerRequest.GetPreloadedEntityBody() is called.

    4) httpWorkerRequest.IsEntireEntityBodyIsPreloaded() is called to make sure
    there are bytes still
    left to retrieve.

    5) A read loop is started to retrieve the rest of the bytes

        5a) httpWorkerRequest.ReadEntityBody() is called to get a chunck of data
    (always returns 0 bytes)
        5b) bytesReceived += bytesRead;
        5c) next iteration of the loop is started
    Thursday, February 2, 2006 11:46 PM

All replies

  • User871153443 posted
    i'm too, i have similar problem. please some body help me !!!!!!!
    Tuesday, March 27, 2007 5:17 PM