Enabling Web Services for Testing outside of the Localhost
●
Permalink
●
suggest edit
In some circumstances, you may need to test .NET web services outside of the localhost, but via the browser. By default, this is disabled in the machine.config. If you were to attempt to browse to a service from a different PC or to access a service under a host name, you’d receive a message stating: “The test form is only available for requests from the local machine.” To circumvent this issue, open up the web.config and add:
1
2
3
4
5
6
7
8
9
10
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
</configuration>
Hope that helps!