Enabling Web Services for Testing outside of the Localhost

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:
<configuration> <system.web> <webServices> <protocols> <add name="HttpGet"/> <add name="HttpPost"/> </protocols> </webServices> </system.web> </configuration>
Hope that helps!

3 Comments

Comments have been disabled for this content.