The WebService test form can only be used for requests from local computers

Question:   After WebService is deployed as a site, if the webservice can be tested locally, it displays "The test form can only be used for requests from the local computer" on the remote site. Or "The test form is only available for requests from the local machine. ", Reason:    That is because remote access is not enabled. Solutions: Add the following configuration section content in the middle of web.config         The following description comes from MSDN: The protocols element specifies that ASP.NET Web services can be used to receive request data and returns sent from the client The protocol of the response data. The protocol can be used to associate request data with methods and their parameters, and to associate response data with methods and their return values. By default, only HttpSoap and Documentation are enabled. To use HttpPost and HttpGet, you need to enable them as shown in the example above. The sub-elements of protocols are (add, clear, remove) add--add ASP.NET Web service can be used to receive the request data sent from the client and return the specified protocol of the 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 used to process the request and response data from the scope of the configuration file. 

Reposted from http://www.cnblogs.com/qqflying/archive/2010/10/21/1857696.html

Leave a Comment

Your email address will not be published.