SOAP request returns with HTTP/1.1 405 Method not allowed

Discussion in 'ASP .Net Web Services' started by Gerrit, Sep 7, 2006.

  1. Gerrit

    Gerrit Guest

    Hello,

    I hope this is teh right group to ask.
    I'm having some problems with a Web Service. The response of requests
    is always:

    HTTP/1.1 405 Method not allowed..
    Server: Microsoft-IIS/5.1


    Situation:

    My Web Serice makes use of MS WSE 2.0.

    The Web.config is configured so that all requests towards a ashx file
    are handled by my RoutingHandler.

    <httpHandlers>
    <add type="Philips.ICIConnector.IciDispatcher.RoutingHandler,
    IciDispatcher" path="*.ashx" verb="*" />
    </httpHandlers>


    Depending on the configuration of the system that is accessing my Web
    Service, I may receive the following message:


    1st Case:
    ------------
    POST / HTTP/1.0..
    content-type: text/xml..
    content-length: 677..
    accept: text/xml,text/html..
    soapaction:
    "http://inqmy.com/soapdispatcher/rpc/bcbici/IciSystemBean"..
    user-agent: SAP Web Application Server (1.0;620)..
    host: 130.139.41.47:8200..
    accept-encoding: gzip..
    sap-language: E....

    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    ......

    And the response will be:

    HTTP/1.1 405 Method not allowed
    Server: Microsoft-IIS/5.1
    Date: Fri, 07 Sep 2006 12:04:29 GMT
    Allow: OPTIONS, TRACE, GET, HEAD
    Content-Type: text/html
    Content-Length: 112



    With a different configuration I will receive message in the following
    format:

    2nd Case:
    ------------
    POST /IciDispatcherService/icidispatcher.ashx HTTP/1.1..
    Host: 130.139.41.47:8200..
    Content-Type: text/xml; charset="UTF-8"..
    Connection: close..
    Content-Length: 744..
    SOAPAction:
    "http://inqmy.com/soapdispatcher/rpc/bcbici/IciUserBean"....

    <?xml version="1.0" encoding="UTF-8" ?><SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    ......

    And the response will be:

    HTTP/1.1 100 Continue..
    Server: Microsoft-IIS/5.1

    etc.... Well, the request will be processed just fine.


    Remarks:
    For *.ashx files IIS is configured for GET, HEAD, POST, and DEBUG
    Default document points to a *.ashx file, i.e. should end up in my
    RoutingHandler


    Question:
    How can I avoid the 405 error?
    How do I succeed that the request (as mentioned in case 1) are handled
    by my "RoutingHandler"?
    Is this problem caused because the first request uses HTTP/1.0 and the
    second HTTP/1.1?
    Or is this problem caused because the first request goes to the root
    while the second request sends the request nicely direct to the
    appropriate Web Application?


    System:

    WinXP
    IIS 5.1


    Any help appreciated.

    Thanks,

    Gerrit
     
    Gerrit, Sep 7, 2006
    #1
    1. Advertisements

  2. Gerrit

    Gerrit Guest

    Thanks for the reply.

    Further info:
    The reason why I do this routing of Web Requests is: My application
    actually implements 6 different web Services and the application we are
    intergating with just send the requests either to:

    POST /IciDispatcherService/icidispatcher.ashx HTTP/1.1.........

    and then it will work just fine or all request are send to:

    POST / HTTP/1.0...........

    and then a HTTP405 is returned.

    The mentioned ashx file does not exist, it is just a dummy link to
    trigger WSE 2.0 to execute the routingHandler.
    The routing handler makes use of WSE 2.0 will check certain parameters
    of the SOAP request and then forward the request to the real web
    service.

    Actually I have the feeling that this error returned by IIS and that it
    never reaches the .Net part.
    So, I'm kind of clueless how to tackle this.

    Thanks,

    Gerrit
     
    Gerrit, Sep 7, 2006
    #2
    1. Advertisements

  3. I notice that the one which fails uses HTTP 1.0, and the one that succeeds
    uses 1.1. Maybe that's it?

    John
     
    John Saunders, Sep 7, 2006
    #3
  4. Gerrit

    Gerrit Guest

    Hi,
    thanks for the answer. We finally managed to get the requests coming in
    as:

    POST /IciDispatcherService/icidispatcher.ashx HTTP/1.0 and then
    everything looks already much better. In that case the requests enter
    my Routinghandler and it is possible to process them.

    Thanks a lot,

    Gerrit

     
    Gerrit, Sep 12, 2006
    #4
  5. Gerrit

    Joined:
    Sep 13, 2012
    Messages:
    1
    Likes Received:
    0
    Hi!
    Did you found solution?
    Thanks
     
    , Sep 13, 2012
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.