HTTP status 405: Method not allowed

Discussion in 'ASP .Net Web Services' started by rk325, Dec 15, 2004.

  1. rk325

    rk325 Guest

    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.
     
    rk325, Dec 15, 2004
    #1
    1. Advertising

  2. rk325

    Mujtaba Syed Guest

    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.

    "rk325" <> wrote in message
    news:...
    > 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, Dec 15, 2004
    #2
    1. Advertising

  3. rk325

    rk325 Guest

    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.
     
    rk325, Dec 15, 2004
    #3
  4. rk325

    Dan Rogers Guest

    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" <>
    >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
    >Organization: http://groups.google.com
    >Lines: 39
    >Message-ID: <>
    >NNTP-Posting-Host: 68.216.171.58
    >Mime-Version: 1.0
    >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:
    >NNTP-Posting-Date: Wed, 15 Dec 2004 19:03:55 +0000 (UTC)
    >User-Agent: G2/0.2
    >Complaints-To:
    >Injection-Info: c13g2000cwb.googlegroups.com; posting-host=68.216.171.58;
    > 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
    >
    >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.
    >
    >
     
    Dan Rogers, Dec 16, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U3RldmVXZXN0bGluZw==?=

    HTTP 405 - Resource not allowed

    =?Utf-8?B?U3RldmVXZXN0bGluZw==?=, Nov 25, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    753
    =?Utf-8?B?U3RldmVXZXN0bGluZw==?=
    Nov 25, 2005
  2. Eric
    Replies:
    3
    Views:
    1,510
    Joerg Jooss
    Feb 27, 2007
  3. Lisa Ngo
    Replies:
    3
    Views:
    490
    Jan Tielens
    Jan 18, 2004
  4. Gerrit
    Replies:
    4
    Views:
    3,937
  5. RK
    Replies:
    5
    Views:
    1,068
    Jim Ley
    Aug 8, 2004
Loading...

Share This Page