What causes an HTTP 405 “invalid method (HTTP verb)” error when POSTing a form to PHP on IIS?

后端 未结 11 1133
没有蜡笔的小新
没有蜡笔的小新 2020-11-29 12:05

I have one form in a PHP (5.2.9-1) application that causes IIS (Microsoft-IIS/6.0) to throw the following error when POSTed:

The page you are looking

相关标签:
11条回答
  • 2020-11-29 12:38

    i had to change my form's POST to a GET. i was just doing a demo post to an html page, on a test azure site. read this for info: http://support.microsoft.com/kb/942051

    0 讨论(0)
  • 2020-11-29 12:39

    We just ran into this same issue. Our Cpanel has expanded from PHP only to PHP and .NET and defaulted to .NET.

    Log in to you Cpanel and make sure you don’t have the same issue.

    0 讨论(0)
  • 2020-11-29 12:40

    I am deploying VB6 IIS Applications to my remote dedicated server with 75 folders. The reason I was getting this error is the Default Document was not set on one of the folders, an oversight, so the URL hitting that folder did not know which page to server up, and thus threw the error mentioned in this thread.

    0 讨论(0)
  • 2020-11-29 12:47

    I don't know why but its happened when you submit a form inside a page to itself by the POST method.

    So change the method="post" to method="get" or remove action="anyThings.any" from your <form> tag.

    0 讨论(0)
  • 2020-11-29 12:49

    The acceptable verbs are controlled in web.config (found in the root of the website) in <system.web><httpHandlers> and possibly <webServices><protocols>. Web.config will be accessible to you if it exists. There is also a global server.config which probably won't. If you can get a look at either of these you may get a clue.

    The acceptable verbs can differ with the content types - have you set Content-type headers in your page at all ? (i.e. if your Content-type was application/json then different verbs would be allowed)

    0 讨论(0)
提交回复
热议问题