Calling a webservice using HTTP Get in .Net

posted in: Uncategorized | 0

BronwenWeeGo I found the need to be able to call my .Net WebService using HTTP Get. Usually all you have to do to get this to work is use the following format:

[webservice asmxlocation]/[functionname]?[parameters]

When i did this i was getting a “Request format is unrecognized for URL unexpectedly ending in '/functioname' ” error.  It's been a long time since i've had to use HTTP Get for a webservice.  You need to add the following into your web.config file to enable the appropriate protocol:

<webServices>
        <protocols>
        <add name="HttpGet" />
        <add name="HttpPost" />
        </protocols>
        </webServices>

 

Technorati Tags: ,,