Http://www.cnblogs.com/easy5weikai/p/3340960.html
WCF in VS, add service reference, address input http://ip/Service.svc, click to go, hint error, the contents are as follows:
An error occurred while downloading ' http://127.0.0.1:7293/wcfserverrefwcflib.svc '. Request failed for HTTP status 404: Not Found. Metadata contains unresolved references: "http://127.0.0.1:7293/wcfserverrefwcflib.svc". There is no endpoint listening on http://127.0.0.1:7293/wcfserverrefwcflib.svc that can accept messages. This is usually caused by an incorrect address or SOAP operation. If this is the case, see innerexception for more information. The remote server returned an error: (404) was not found. If the service is already defined in the current solution, try to build the solution, and then add the service reference again. |
The solution is:
Add in WCF Server <system.serviceModel> node:
<servicehostingenvironment multiplesitebindingsenabled= "true"/>