Today, we will test the web page in the network environment. When an error is reported in the result, the WebService cannot be remotely accessed when it is captured.
The returned message "test form can only be used for requests from a local computer ."
After searching, I found the answer in the 'hoh' blog. The following is a solution.
Allows the client to open the test form
As we all know, after the Web Service is ready and published on the Internet, when others want to call the interface you provide, they cannot open the test form, which makes many friends quite depressed, why can't I open the test form with the service interfaces provided by others? Is it mine?CodeIs there a problem with writing? In fact, this is not the case. Next I will teach you how to implement this function.
First, we use Microsoft Visual Studio. NET 2003 to open the service to be published. Find "project" and enter. Assume that your project name is WebService. Click "WebService properties" to go to the "WebService properties page". Then, locate the Configuration Attribute and click it, select "debug" in "start operation. Locate the "debug mode" item, select "wait to append to external process", and set "start remote debugging" to "true ", is that enough? You can try again. Why not? Don't worry, it's just a step away. Let's go on, we'll be on the web. add the following code in the config file: Of course, it is not always possible to add it there. We can find out that WebServices belong to system. the following code is stored in the <system. web> </system. web>.
Code
< WebServices >
< Protocols >
< Add Name = "Httpsoap" />
< Add Name = "Httppost" />
< Add Name = "Httpget" />
< Add Name = "Documentation" />
</ Protocols >
</ WebServices >