Friday, August 29, 2008

Test a Web Service operation using the HTTP POST protocol

Dot .Net Dilemmas
It's on a million other forums and blogs but it's one that I found very useful and has I have said, the main reason for this blog is to keep all the tips and pieces of code that I use over and over in once place (and at the same time, maybe help one or two others that have the same issues).

If you need to test a Web Service that is not staged locally, you need to enable remote testing. To do this, add <add name="HttpPost"/> under <system.web> in the web.config of the web service.

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

Now you can call the web service from a different machine and get the test form.

No comments: