title: asmx method always acting as HttpGet
body: <p>I'm trying to implement HttpPost method on ASP.NET .asmx. I tried the follwing but it always acting as a httpGet method.</p>
  
  <pre><code>[WebMethod]
  [ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = false)]
  [System.Web.Http.HttpPost]
  public void token()
  {
     //enter code here
  }
  </code></pre>
  
  <p>When I try a POST request on Postman, it return the following error.</p>
  
  <blockquote>
    <p>System.InvalidOperationException: Request format is invalid: .    at
    System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()<br>
    at
    System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</p>
  </blockquote>
  
  <p>I have also added the following in the web.config</p>
  
  <pre><code>  &lt;protocols&gt;
      &lt;add name="HttpSoap"/&gt;
      &lt;add name="HttpGet"/&gt;
      &lt;add name="HttpPost"/&gt;
    &lt;/protocols&gt;
  </code></pre>
  
  <p>What other changes do I need to make to make it a HttpPost method?</p>