Delta Engine Blog

AI, Robotics, multiplatform game development and Strict programming language

How to allow web services to be called and tested remotely

My blog posts are getting shorter ^^

Usually you can't execute web service methods from the autogenerated web service site remotely to test them. By default you will get the following message where the web service test is supposed to be:
  • The test form is only available for requests from the local machine
Fix this by adding the following to your web.config file of your web service:

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


BTW: Any messages in the Test section of the web service site will be "The test form is only available for requests from the local machine" even if the problem is something else, which you will see when testing locally like "The test form is only available for methods with primitive types as parameters.". There seem to be no way around that.