Search code examples
asp.netweb-services

Request format is unrecognized for URL unexpectedly ending in


When consuming a WebService, I got the following error:

Request format is unrecognized for URL unexpectedly ending in /myMethodName

How can this be solved?


Solution

  • Found a solution on this website

    All you need is to add the following to your web.config

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

    More info from Microsoft