Skip to content Skip to sidebar Skip to footer

Post Verb Not Allowed

A bit basic, but I have tried some of the methods to tackle the following error but could not get the right solution.

Solution 1:

The following code has solved the problem for me(it's for php on iis).

web.config:

<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><handlersaccessPolicy="Read, Execute, Script"><removename="PHP55_via_FastCGI" /><addname="PHP55_via_FastCGI"path="*.php"verb="*"modules="FastCgiModule"scriptProcessor="C:\Program Files (x86)\PHP\v5.5\php-cgi.exe"resourceType="Either"requireAccess="Script" /><addname="HTML_via_FastCGI"path="*.html"verb="*"modules="FastCgiModule"scriptProcessor="C:\Program Files (x86)\PHP\v5.5\php-cgi.exe"resourceType="Either"requireAccess="Script" /><addname="HTM_via_FastCGI"path="*.htm"verb="*"modules="FastCgiModule"scriptProcessor="C:\Program Files (x86)\PHP\v5.5\php-cgi.exe"resourceType="Either"requireAccess="Script" /></handlers><security><requestFiltering><fileExtensions><addfileExtension=".php"allowed="true" /></fileExtensions><verbs><addverb="POST"allowed="true" /><addverb="GET"allowed="true" /><addverb="HEAD"allowed="true" /><addverb="DELETE"allowed="true" /><addverb="PUT"allowed="true" /></verbs></requestFiltering></security></system.webServer>

Solution 2:

Without seeing more, this could be a variety of problems. With that in mind, here is a list of possible fixes for your issue:

Cause 1

This problem occurs because the client makes an HTTP request by using an HTTP method that does not comply with the HTTP specifications.

To resolve this problem, see resolution 1.

Cause 2

This problem occurs because a client makes an HTTP request by sending the POST method to a page that is configured to be handled by the StaticFile handler. For example, a client sends the POST method to a static HTML page. However, pages that are configured for the StaticFile handler do not support the POST method.

To resolve this problem, see resolution 2.

Resolution 1

Make sure that the client sends a request that contains a valid HTTP method. To do this, follow these steps:

  1. Click Start, type Notepad in the Start Search box, right-click Notepad, and then click Run as administrator.
  2. Note If you are prompted for an administrator password or for a confirmation, type the password, or provide confirmation. On the File menu, click Open. In the File name box, type %windir%\system32\inetsrv\config\applicationhost.config, and then click Open.
  3. In the ApplicationHost.config file, locate the tag.
  4. Make sure that all the handlers use valid HTTP methods.
  5. Save the ApplicationHost.config file.

Resolution 2

Send the POST request to a page that is configured to be handled by a handler other than the StaticFile handler (for example, the ASPClassic handler). Or, change the request that is being handled by the StaticFile handler so that it is a GET request instead of a POST request.

MSDN Source

Solution 3:

In my opinion you have 2 errors: 1) If your file extension is *.html change it to for example *.asp, *.php and it will work. 2)The input tag doesn't have closing tag.

Post a Comment for "Post Verb Not Allowed"