title: WCF service Post request gives error if calling from browser like "Method not allowed."
body: <p>i have created WCF POST method. when i call it from browser by passing parameter in querystring it gives me error like</p>
  
  <blockquote>
    <p>Method not allowed. Please see the service help page for constructing valid requests to the service</p>
  </blockquote>
  
  <p>my code is in interface</p>
  
  <pre><code>[ServiceContract]
  public interface IService
  {
      //[OperationContract]
      //[WebGet(UriTemplate = "/UpdateDeviceStatus?FaultStatus={FaultStatus}&amp;MacAddress={MacAddress}", RequestFormat = WebMessageFormat.Xml)]
      //string UpdateDeviceStatus(string FaultStatus, string MacAddress);
  
  
      [OperationContract]
      [WebInvoke(Method = "POST",
      BodyStyle = WebMessageBodyStyle.WrappedRequest,
      ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
      UriTemplate = "/UpdateDeviceStatus?FaultStatus={FaultStatus}&amp;MacAddress={MacAddress}")]
      [System.Web.Script.Services.ScriptMethod(ResponseFormat = System.Web.Script.Services.ResponseFormat.Json)]
      string UpdateDeviceStatus(string FaultStatus, string MacAddress);
  }
  </code></pre>
  
  <p>And in Service.svc</p>
  
  <pre><code>public string UpdateDeviceStatus(string FaultStatus, string MacAddress)
  {
      try
      {
         // here my operation
      }
      catch (Exception ex)
      {
          return "Failed to update";
      }
  }
  </code></pre>
  
  <p>URL that i am calling from browser is </p>
  
  <pre><code>http://localhost:2121/WcfService/Service.svc/UpdateDeviceStatus?FaultStatus={1}&amp;MacAddress={20:10:00:20:10:00}
  </code></pre>
  
  <p>NOTE: if i use webGet method then it works but for POST method it is not working can any one please give me solution for this?</p>