WebService remote test shows that "test form can only be used for requests from local computers

Source: Internet
Author: User

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 >

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.