Questions tagged [http-status-code-405]

"Method not allowed": generally returned if a client attempts to use an incorrect method (such as POST) for a request to a particular URL.

Web servers return the HTTP status code 405 in response to requests using a particular method for a given URL that are not among the methods the server allows for that URL.

For example, the https://developer.mozilla.org server allows the GET method for the URL https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 but disallows the POST method. A POST to that URL causes the server to send a response with HTTP status code 405.

That response also includes the response header Allow: GET, PUT, HEAD.

According to the HTTP specification http://httpwg.org/specs/rfc7231.html#status.405:

The origin server MUST generate an Allow header field in a 405 response containing a list of the target resource's currently supported methods.

463 questions
552
votes
24 answers

Response to preflight request doesn't pass access control check

I'm getting this error using ngResource to call a REST API on Amazon Web Services: XMLHttpRequest cannot load http://server.apiurl.com:8000/s/login?login=facebook. Response to preflight request doesn't pass access control check:…
Andre Mendes
  • 5,807
  • 2
  • 12
  • 22
141
votes
10 answers

Web API Put Request generates an Http 405 Method Not Allowed error

Here's the call to the PUT method on my Web API - the third line in the method (I am calling the Web API from an ASP.NET MVC front end): client.BaseAddress is http://localhost/CallCOPAPI/. Here's contactUri: Here's contactUri.PathAndQuery: And…
Mike Marks
  • 9,463
  • 15
  • 61
  • 120
123
votes
14 answers

WebAPI Delete not working - 405 Method Not Allowed

I appreciate any help on this as the site is supposed to go live tonight! I have a web api controller with a Delete method. The method executes fine on my local machine running IIS Express (Windows 8) but as soon as I deployed it to the live IIS…
Chris
  • 4,757
  • 3
  • 17
  • 24
122
votes
11 answers

SVN 405 Method Not Allowed

I accidentally deleted a folder in SVN and added it back immediately. I ran into an issue with this and my solution ended up removing the folder completely from my local copy as well as the server copy. I can do updates and commits without problems…
roadsunknown
  • 3,060
  • 6
  • 26
  • 35
46
votes
4 answers

405 POST method not allowed

I'm trying to develop a REST provider with OAuth. I'm using Django RESTFramework and DjangoOAuthToolkit. I did a GET and it works perfectly but I'm trying to use a POST and the server responds with {"detail": "Method 'POST' not allowed."} This is my…
ecorzo
  • 515
  • 1
  • 5
  • 7
33
votes
4 answers

Why does HTTP DELETE verb return 405 error - method not allowed for my RESTful WCF service running on IIS 7.5?

Can anyone shed any light on this? I feel like I have wasted the entire day today hunting and searching the internet for any scrap of information about how to do this. I have created a very simple WCF RESTful service. It is basically a proof of…
Corey Burnett
  • 7,048
  • 9
  • 52
  • 87
32
votes
7 answers

server error:405 - HTTP verb used to access this page is not allowed

I have a php Facebook application which I have uploaded in a Microsoft server. When I run the application i get this error. Does anybody know the cause of this ? 405 - HTTP verb used to access this page is not allowed. The page you are looking…
Florian Shena
  • 1,264
  • 4
  • 18
  • 26
22
votes
2 answers

HTTP Status 405 - HTTP method is not supported by this URL

I have the following servlet: public class MyServlet extends HttpServlet { private static final long serialVersionUID = 16252534; private static int ping = 3000; private Thread t; private static boolean shouldStop = false; …
CeccoCQ
  • 3,574
  • 12
  • 47
  • 80
19
votes
1 answer

(405) Method Not Allowed. WCF WebService

Introduction: Hello, I am trying to set up a WCF web service on my local IIS 7.5 server, however after I finish the basic configurations I am unable to send data with a WinForms test client and it returns the error mentioned in the titles. I have…
Grossu Iulian
  • 255
  • 1
  • 2
  • 9
19
votes
2 answers

ASP.NET MVC got 405 error on HTTP DELETE request?

I'm trying to pass the DELETE to a URL in asp.net MVC using JavaScript but however i always got 405 Method not allow return. is there anyway to make this work? FYI: I've put the [AcceptVerb(HttpVerb.Delete)] attribute on my controller. DELETE…
DucDigital
  • 4,370
  • 9
  • 47
  • 93
18
votes
5 answers

Spring - 405 Http method DELETE is not supported by this URL

Well I have a strange problem with executing a "DELETE" HTTP request in Spring. I have a controller method which I have mapped a DELETE request to: @RequestMapping(value = "/{authorizationUrl}",method=DELETE) public void…
Sasanka Panguluri
  • 2,861
  • 2
  • 27
  • 50
18
votes
1 answer

Pretend Firefox instead of Phantom.js

When I try to scrap this site with Phantomjs, by default, Phantomjs send the following headers to server: "name":"User-Agent", "value":"Mozilla/5.0 (Unknown; Linux i686) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.1 Safari/534.34"} And I…
khex
  • 2,469
  • 6
  • 28
  • 49
16
votes
3 answers

Post returns 405 method not allowed

I am having an issue with my Rails localhost Server, all Post calls started returning 405 method not allowed. However there are no problems on our staging and production servers. It is happening on all branches of code even ones that have not been…
16
votes
3 answers

Why our server receives CONNECT method requests from our android app while we don't use it in our code?

Some users complained about network issues. Our android app communicates to our server through https. Our Apache logs showed responses with the status; "405 Method not allowed (CONNECT)", this problem was only reproduced on specific IP addresses. I…
tbruyelle
  • 12,315
  • 7
  • 55
  • 73
16
votes
3 answers

Ajax Post: 405 Method Not Allowed

Within my API Controller called Payment, I have the following method: [HttpPost] public HttpResponseMessage Charge(Payment payment) { var processedPayment = _paymentProcessor.Charge(payment); var response =…
Mike
  • 2,441
  • 7
  • 33
  • 54
1
2 3
30 31