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