Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > SOAP request returns with HTTP/1.1 405 Method not allowed

Reply
Thread Tools

SOAP request returns with HTTP/1.1 405 Method not allowed

 
 
Gerrit
Guest
Posts: n/a
 
      09-07-2006
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.RoutingHa ndler,
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/"
xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlnssi="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/"xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnss="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

 
Reply With Quote
 
 
 
 
Gerrit
Guest
Posts: n/a
 
      09-07-2006
Gaurav Vaish (www.EduJiniOnline.com) schrieb:

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

>
> Firstly, there already exists a handler for *.ashx... I don't think you need
> to reregister it unless you have a very specific requirement.
>
> Secondly, it seems that you want to do some internal routing of the web
> service depending upon the request parameters... I would suggest taking a
> more standards-based approach by looking into WS-Addressing.
> You will, yes, need to look into WSE.
>
>
> --
> Happy Hacking,
> Gaurav Vaish | http://www.mastergaurav.com
> http://articles.edujinionline.com/webservices
> -------------------


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

 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      09-07-2006
"Gerrit" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Gaurav Vaish (www.EduJiniOnline.com) schrieb:
>
>> > 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?

>>
>> Firstly, there already exists a handler for *.ashx... I don't think you
>> need
>> to reregister it unless you have a very specific requirement.
>>
>> Secondly, it seems that you want to do some internal routing of the web
>> service depending upon the request parameters... I would suggest taking a
>> more standards-based approach by looking into WS-Addressing.
>> You will, yes, need to look into WSE.
>>
>>
>> --
>> Happy Hacking,
>> Gaurav Vaish | http://www.mastergaurav.com
>> http://articles.edujinionline.com/webservices
>> -------------------

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


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

John


 
Reply With Quote
 
Gerrit
Guest
Posts: n/a
 
      09-12-2006
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


Gaurav Vaish (www.EduJiniOnline.com) schrieb:

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

>
> Ok... got your problem.
> (Thanks John for the hint).
>
>
>
Quote:
> ------------
> 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
>
>
> Technically wrong request.
> The HTTP/1.0 version does not know about the "Host" header. It was
> introducted in version 1.1
>
> The 1.0 request should have been:
>
>
Quote:
> POST http://130.139.41.47:8200/ HTTP/1.0
> ----Other--Headers--As--Above--Host--May--Be--Absent
>
>
>
>
> --
> Happy Hacking,
> Gaurav Vaish | http://www.mastergaurav.com
> http://articles.edujinionline.com/webservices
> -------------------


 
Reply With Quote
 
vladimirb@netcom.co.il vladimirb@netcom.co.il is offline
Junior Member
Join Date: Sep 2012
Posts: 1
 
      09-13-2012
Hi!
Did you found solution?
Thanks
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Http Post error (405) Method Not Allowed. Eric ASP .Net 3 02-27-2007 09:55 PM
The remote server returned an error: (405) Method Not Allowed. John ASP .Net 0 09-11-2006 03:43 PM
HttpWebRequest.GetResponse on POST returns 405 method not allowed GlennLanier ASP .Net 2 06-10-2005 12:15 PM
Msxml2.XMLHTTP object's send method throwing HTTP /1.1 405 - Method not allowed error. RK Javascript 5 08-08-2004 08:52 PM
(405) Method Not Allowed when uploading a file to a web site Rocio ASP .Net 0 04-05-2004 03:10 PM



Advertisments