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

Source: Internet
Author: User

Http://www.cnblogs.com/qqflying/archive/2010/10/21/1857696.html

Question:

After WebService is deployed as a site, if the local test webservice can run, the remote display "test form can only be used for requests from the local computer" or "the test form is just available for requests from The local machine. ",

Reason:

That's because there's no reason to turn on remote access.

Solutions:

Add the following configuration section to the <system.web></system.web> center of Web. config
<webServices>
<protocols>
<add name= "HttpSoap"/>
<add name= "HttpPost"/>
<add name= "HttpGet"/>
<add name= "Documentation"/>
</protocols>
</webServices>

The following instructions are from MSDN:
The Protocols element specifies the protocol that the ASP. NET Web service can use to receive request data sent from the client and to return the response data. The protocol can be used to correlate the request data with the method and its parameters, associating the response data with the method and its return value. By default, only HttpSoap and documentation are enabled. To use HttpPost and httpget, you need to enable them as shown in the previous example.
The child elements of the Protocols are (Add,clear,remove)
add--adds an ASP. NET Web service that can be used to receive request data sent from the client and to return the response data for the specified protocol. By default, only HttpSoap and documentation are enabled.
clear--removes all protocols from the scope of the configuration file.
remove--removes the specified protocol for processing request and response data from within the scope of the configuration file.

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

Related Article

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.