ARR 2.0 BUG - combined with managed http module timeout on read inputstreamRSS

5 replies

Last post May 16, 2018 08:10 AM by girishkolte2000

  • ARR 2.0 BUG - combined with managed http module timeout on read inputstream

    Mar 29, 2011 12:28 PM|cosmins|LINK

    Hey.
    I have an ARR related problem. I have posted the full description at stackoverflow too:
    http://stackoverflow.com/questions/5475608/iis7-application-request-routing-arr-reverse-proxy-combined-with-managed-module

    Basically I am using ARR in reverse proxy mode with URL rewrite, all works fine, all pages delivered ok.
    Then I add a managed http module. Works fine too. I can manually log in a file request headers, response headers, etc.
    I have used a response.filter custom built stream applied on RequestStart and I can see the response too.


    The moment I try to read the Request.InputStream on BeginRequest, I get timeouts:
    HTTP Error 502.3 - Bad Gateway The operation timed out Handler ApplicationRequestRoutingHandler Error Code 0x80072ee2
    MODULE_SET_RESPONSE_ERROR_STATUS Warning ModuleName="ApplicationRequestRouting", Notification="EXECUTE_REQUEST_HANDLER", HttpStatus="502", HttpReason="Bad Gateway", HttpSubStatus="3", ErrorCode="2147954402", ConfigExceptionInfo="" SET_RESPONSE_ERROR_DESCRIPTION Warning ErrorDescription="The operation timed out"


    If I read the Request.InputStream on EndRequest of my module, it has the size 0 bytes, even if I made a POST.

    I am just guessing ARR is disturbed by the fact that I read the input stream.


    LATER EDIT: Made a TCP dump with WireShark and looked also a WinHttp tracing in both cases (module accessing input stream and without accessing). Apparently ARR only sends the initial TCP packet with the headers, it doesn't send anymore the second package with the POST content, and then it RSTs the connection. This seems like a bug to me.

    Ideas?
    Thanks.

    ARR timeout iis 7 Application request routing arr httpmodule

  • Re: ARR 2.0 BUG - combined with managed http module timeout on read inputstream

    Mar 31, 2011 03:05 AM|Lloydz|LINK

    Hi,

    Where do you add the managed module, arr server or back-end server? Does the module work correctly if you disable arr?

    Thanks.

  • Re: ARR 2.0 BUG - combined with managed http module timeout on read inputstream

    Mar 31, 2011 05:45 AM|cosmins|LINK

    Yes, the module works correctly if I disable ARR. Looking at failed req tracing, if ARR reads the input stream, it doesn't keep the stream/data available for further processing. Anil Ruia recommended me to use Server.Transfer, looking into it now. Thanks,
  • Re: ARR 2.0 BUG - combined with managed http module timeout on read inputstream

    Oct 31, 2017 07:19 PM|RaviA4G|LINK

    Is the issue resolved and if yes, what is the final fix ?

    -Ravi
  • Re: ARR 2.0 BUG - combined with managed http module timeout on read inputstream

    Apr 09, 2018 05:27 PM|ParagSK|LINK

    We too faced same problem with ARR and HttpModule (one of the problem out of many). We needed HttpModule for various validations before sending request to the backend. If the module read request payload in any event before actual ProcessRequest then backend says Timeout with bad request.

    After reading if we called this request.InsertEntityBody() it worked finally for us (we didn't passed any parameter). The method says to provide request entity body to IIS. Really not sure if this is like ARR issue because there is not much I could see on internet on this issue. One can give it a try if issue.

     

  • Re: ARR 2.0 BUG - combined with managed http module timeout on read inputstream

    May 16, 2018 08:10 AM|girishkolte2000|LINK

    Hi,

    I am facing the same issue, post API calls are not working due to body is not forwarded to ARR, I tried the request.InsertEntityBody() but it's not working.

    please can anyone suggest any solution?

    Thanks

    G