title: WCF REST POST Service - Method not allowed when calling from HTML FORM
body: <p>Suddenly I'm getting an error 'Method not allowed.' when calling a WCF REST POST Service from a HTML Form as below (It was working earlier in Development, UAT, Production environments, but is now failing.</p>
  
  <p>What could have caused this issue? and what is a potential fix ?</p>
  
  <pre><code>&lt;form action="http://localhost:8750/MyService/MyEmailService/RecordResponse" method="post" runat="server"&gt;
      &lt;div align="left"&gt;
          &lt;input type="hidden" name="userid" value="abc"&gt;
          &lt;input type="hidden" name="itemid" value="625"&gt;
          &lt;select name="response"&gt;
              &lt;option value="Approved"&gt;Approve&lt;/option&gt;
              &lt;option value="Rejected"&gt;Reject&lt;/option&gt;
          &lt;/select&gt;
          &lt;textarea cols="40" rows="5" name="comment"&gt;Add comments here&lt;/textarea&gt;
          &lt;input type="Submit" value="Submit"&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  
  [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
  [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
  public class MyEmailService: IMyEmailService, ISessionAwareService
  {
      [OperationContract]
      [WebInvoke(UriTemplate = "/RecordResponse", Method = "POST")]
      public void RecordResponse(Stream stream)
      { 
          // My business logic
      }
  }
  </code></pre>
  
  <p>The configuration is as follows: </p>
  
  <pre><code>&lt;endpointBehaviors&gt;
      &lt;behavior name="webby"&gt;
        &lt;webHttp helpEnabled="true"/&gt;
      &lt;/behavior&gt;
  
    &lt;service name="CTRL.Server.CommandHandlerService.EmailHandlerService"&gt;
      &lt;endpoint address="http://localhost:8750/MyService/MyEmailService" 
                binding="webHttpBinding" 
                contract="MyService.ServiceContracts.IEmailService" 
                behaviorConfiguration="webby"/&gt;
  
    &lt;webHttpBinding&gt;
      &lt;binding name="secure"&gt;
        &lt;security mode="Transport"&gt;
          &lt;transport clientCredentialType="Basic" /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/webHttpBinding&gt;
  </code></pre>