locked
HttpModule + 400 bad request + Client found response content type of '', but expected 'text/xml'. The request failed with an empty response. RRS feed

  • Question

  • User1022841519 posted

    Hi,

    I have a requirement to intercept all SOAP requests and extract request details to instantiate a serializable object. As a starting poing I've created a simple asp.net webservice with Method "Add(int a, int b). I'm able to intercept the request and extract details as well. However, for some strange reason the request is coming back as "Client found response content type of '', but expected 'text/xml'. The request failed with an empty response." the status-code of Response is "400: Bad Request". I tried consuming the web-service from asp.net webform as well as WebServiceStudio. But without any luck. Could anyone please help me out with this?


    Thanks,

    Samir

    Wednesday, September 30, 2009 1:00 AM

Answers

  • User1022841519 posted

    The request input stream was getting read before being forwarded to the next httpmodule in the pipleline. After changing the code to copy the bytes from input stream to another array for processing, it started working.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, November 15, 2009 11:12 PM

All replies

  • User1633691049 posted

    Maybe you could provide some code out of your httpmodule.

    Wednesday, September 30, 2009 2:46 AM
  • User1022841519 posted

    The request input stream was getting read before being forwarded to the next httpmodule in the pipleline. After changing the code to copy the bytes from input stream to another array for processing, it started working.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, November 15, 2009 11:12 PM