Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2004

Tip: Looking for answers? Try searching our database.

HTTP status 405: Method not allowed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rk325 - 15 Dec 2004 19:03 GMT
Yes, I've seen many posts about this type of error, and none of the
solutions people applied worked for me. So please read this one
carefully and help me if you can.

I have a web service application installed in a Windows 2000 SP4 Domain
control server. It is running IIS 5.0. I can access the WS from its own
web page, and, when I access it from the server where it is installed,
I can run its methods.

However, I cannot access this WS from an ASP.NET web application. The
error I get is:

The request failed with HTTP status 405: Method not allowed.
:                     :                  :
Exception Details: System.Net.WebException: The request failed with
HTTP status 405: Method not allowed.

yes, the stack trace tells me that it crashes on the first WS method
the web site tries to hit.

The WS has been setup to accept 1) Anonymous Access, 2) Integrated
Windows Authentication.
In the code to access this WS I am passing the credentials to access
the WS......and if the credentials are incorrect (e.g. typo) I get the
"401: Access Denied" error.

The domain control server, had already IIS installed when I installed
the .NET 1.1 Framework. But when I looked at the users I cannot find
the ASPNET user anywhere. I also tried running "aspnet_regiis -i" then
"iisreset", and no luck, still the same 405 error.

Without the ASPNET user, I tested this server by running the simple
Hello World asp.net application; it ran find. I even tested it with a
more complex application that queries the local SQL server db and it
worked fine. So I guess I do not need the ASPNET user, or do I?

Please I've been pulling my hair for 2 days already on this issue, and
do not know how to solve it.
Mujtaba Syed - 15 Dec 2004 19:11 GMT
Hi:

Make sure you have not disabled the SOAP protocol bindings in
[machine|web].config
When you test the web service using its own help page, the binding used is
HTTP-POST (.NET 1.1) or HTTP-GET (.NET 1.0).
When you use a proxy, the SOAP protocol binding is used.

<webServices>
     <protocols>
       <add name="HttpSoap" />  <----------- This line should _not_ be
commented.
       <!-- <add name="HttpPost"/> -->
       <!-- <add name="HttpGet"/> -->
       <add name="HttpPostLocalhost" />
       <add name="Documentation" />
     </protocols>
</webServices>

Thanks,
Mujtaba.

> Yes, I've seen many posts about this type of error, and none of the
> solutions people applied worked for me. So please read this one
[quoted text clipped - 34 lines]
> Please I've been pulling my hair for 2 days already on this issue, and
> do not know how to solve it.
rk325 - 15 Dec 2004 19:38 GMT
Thanks Mujtaba.
I looked at the machine.config file and the line you mention above is
uncommented. There are no similar lines in web.config just in case.
I'm still getting the same 405 error.
Dan Rogers - 16 Dec 2004 19:05 GMT
Hi,

I have a feeling this might be a result of an improperly formed SOAP
request.  When you make a call thru the proxy, it uses HTTP Post to post a
SOAP envelope and HTTP header.  The http header has a SoapAction field that
needs to be properly formed to match a method that the service accepts.  if
your client sends the wrong Action value, you will get a method not allowed
error returned to the client.

Have you tried making your application call your service code on your
development machine?  This would help isolate the conditions (old version
of windows, old version of IIS, .NET framework) and  help you remove the
security considerations.

Also, for Windows Auth (you didn't mention how you are making the call),
have you made sure that keep-alives are allowed on both the server IIS site
settings for your app, and in the proxy itself?

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
>From: "rk325" <rocio.katsanis@softwareservices.net>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices,
microsoft.public.dotnet.framework.webservices
>Subject: HTTP status 405: Method not allowed
>Date: 15 Dec 2004 11:03:50 -0800
[quoted text clipped - 5 lines]
>Content-Type: text/plain; charset="iso-8859-1"
>X-Trace: posting.google.com 1103137435 3971 127.0.0.1 (15 Dec 2004
19:03:55 GMT)
>X-Complaints-To: groups-abuse@google.com
>NNTP-Posting-Date: Wed, 15 Dec 2004 19:03:55 +0000 (UTC)
[quoted text clipped - 3 lines]
>   posting-account=Wrg09g0AAACwvkCCMBaEoK07BSZc_Kbd
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwi
x.com!newsfeed.cwix.com!news.maxwell.syr.edu!postnews.google.com!c13g2000cwb
.googlegroups.com!not-for-mail
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8118
microsoft.public.dotnet.framework.aspnet.webservices:27225
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
[quoted text clipped - 36 lines]
>Please I've been pulling my hair for 2 days already on this issue, and
>do not know how to solve it.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.