The HTTP verb POST used to access path ‘/test.html’ is not allowed

Below is my code:

<form id="productForm" method="post" action="test.html">

</form>

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Are you using any URL rewriting? (http://forums.asp.net/t/953470.aspx)

In the webserver, is POST allowed for HTML files? Try changing the extension to .ASPX or .PHP

Method 2

I found this post while working on my first Facebook app, so this may or may not be related to your underlying issue…but I was getting this same error.

While a Canvas URL value has to end in “/”, the Tabl URL can be a fully qualified page (e.g. http://[DOMAIN/DIRECTORY-PATH]/Default.aspx).

I’m working locally, so http://localhost:4604/Main/Default.aspx worked for me.

HttpGet, HttpPost protocols do not appear to be required in the web.config (although this fix still worked with them in there).

Method 3

The first that comes to mind is permissions.

What version of IIS ? By default IIS6 prevents a post to a HTML file.

Method 4

This sounds like the directive is used in your (supposedly) Apache web server?
You would need to check the httpd.conf for this directive and make sure that POST is allowed to be called on your file.

Nevertheless does it seem a little odd to POST on a static html file or is mod_rewrite being used to confuse people?

Method 5

The default for this error is that the POST verb is turned off at the configuration for the server. Is this happening in Cassini or in IIS? In IIS this behavior can be controlled. Also you may want to make sure that the proper handlers are in your web.config if you are still having issues after looking at the IIS configuration (if this ends up being web service related):

<system.web>  
    <webServices>    
        <protocols>    
            <add name="HttpGet"/>
            <add name="HttpPost"/>


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x