Thursday, January 10, 2008

Calling web services from remote machines easy way: Test environment

If you are faced with the web service error while invoking the service from remote machine, by default, it would display the message "The test form is only available for requests from the local machine."

Add this piece of section in your web.config to enable your web service to be invoked from remote machines,
Add the following settings to the Web.Config file of the Web Service -

(XML start << and >> signs are not visible...dont know how to do that with this blogger editor!)
add name="HttpGet"
add name="HttpPost"

This would enable the Web service to be able to be invoked from remote machine. This setting would only be useful in development / testing scenarios and it is advisable to remove /comment the above section when releasing for production, due to security reasons.

No comments: