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>

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>