Problem:
After the WebService is deployed as a site, if you can test the webservice locally, "test form can only be used for requests from local computers" or "The test form is only available for requests from the local machine. ",
Cause:
This is because remote access is not enabled.
Solution:
Add the following configuration section in <system. web> </system. web> of web. config:
<WebServices>
<Protocols>
<Add name = "HttpSoap"/>
<Add name = "HttpPost"/>
<Add name = "HttpGet"/>
<Add name = "Documentation"/>
</Protocols>
</WebServices>
MSDN description:
The protocols element specifies the protocol that ASP. NET Web services can use to receive request data sent from the client and return response data. The protocol can be used to associate request data with methods and their parameters, and associate response data with methods and their return values. By default, only HttpSoap and Documentation are enabled. To use HttpPost and HttpGet, enable them as shown in the preceding example.
The sub-element of protocols is (add, clear, remove)
Add -- add a specified protocol for ASP. NET Web services to receive request data sent from the client and return response data. By default, only HttpSoap and Documentation are enabled.
Clear -- remove all protocols from the scope of the configuration file.
Remove -- remove the specified protocol from the configuration file to process the request and response data.