There is no problem getting metadata from * * for WCF Testing

Source: Internet
Author: User
Tags wsdl

After we have created a WCF service successfully, there is no problem with native localhost access and testing. However, the following error message will appear when boarding a iis/other platform.

1. Using the WCF Test client error

2. Referencing a service reference error through C #

What is this for? In the case of this machine everything is OK, but as long as the deployment on the service side of the error. The problem was discovered by querying the relevant technical documents. Original because:

In a native environment test, use a URL address of localhost, such as http://localhost:8888/Service access without problems.

Then, after the service is deployed to the server, it is still not a problem to have the localhost replaced with the server IP address in the browser. However, since the XML configuration is still localhost, the access path is still http://localhost:8888/Service?wsdl instead of HTTP://192.168.1.100:8888/SERVICE?WSDL when the service needs to invoke the WSDL file. Therefore, the system will not find the corresponding XML file when it needs to call the WSDL after the server is deployed, and it will definitely get an error. Such as:

The solution is:

When you deploy WCF on the server side, you need to change the access address in the configuration file to the IP address on the server side:

PS: Change the baseaddress address while changing the access address and WSDL address.

Once the changes are complete, we access the WCF service again through the browser.

At this point all access to the default URL path is correct, will not report the above error.

Also: If you are prompted to call the "caller is not authenticated by the server" when calling the WCF method, see "The caller of the WCF error is not authenticated by the server"

There is no problem getting metadata from * * for WCF Testing

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.