1
votes

Below is the error I am receiving when trying to execute php in localhost. Its comes from when I click a form input that then executes the php which uses the 'POST' request. The errors looks like its coming from a handler that doesn't have the POST verb defined in it. My questions is, is how do I locate which handler this error is coming from? . I have had a look at some online resources but none of are using IIS or at least the newer versions of it so its hard to follow.

HTTP Error 405.0 - Method Not Allowed The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.

Most likely causes: The request sent to the Web server used an HTTP verb that is not allowed by the module configured to handle the request. A request was sent to the server that contained an invalid HTTP verb. The request is for static content and contains an HTTP verb other than GET or HEAD. A request was sent to a virtual directory using the HTTP verb POST and the default document is a static file that does not support HTTP verbs other than GET or HEAD.

Below are the steps the error gives to solve it. I have looked through the logs and found it definitely the POST request. I am not sure how to create a tracer though.

Things you can try: Verify the list of verbs enabled for the module handler this request was sent to, and ensure that this verb should be allowed for the Web site. Check the IIS log file to see which verb is not allowed for the request. Create a tracing rule to track failed requests for this HTTP status code.

I am aware there are other posts similar to this and I have been through a majority of them with no resolution.

Thank you in advance.

  • Solved by removing handler and adding it back in the webconfig file with verb="*".
1
what kind of web server you are using? - mitkosoft
Thank you for your comment, I have literally just solved it by removing the handler name and adding it back with the verbs set to verb="*" in the web config file. - Clifferto
if your issue is resolved I request you to post the helpful suggestion and mark that as an answer it will help other people who face a similar issue. - Jalpa Panchal

1 Answers

2
votes

I found the web config file for the handler the error was related to. I then removed it and added back using verb="*". This sets the handler to accept all verbs including POST which I needed.