我正在尝试将一个 asp.net 页面绑定到另一个网站托管的 wcf 服务,
客户端的 web.config 文件包含以下代码:
<endpoint address="http://localhost:1670/webhost/CustomersService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_ICustomersService" contract="CustomersService.ICustomersService" name="BasicHttpBinding_ICustomersService"/>
</client>
该服务的 web.config 文件包含以下代码:
<endpoint address="" binding="wsHttpBinding" contract="CustomerServiceLibrary1.ICustomersService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
错误是:
错误 1 Reference.svcmap:system.serviceModel/bindings/wsHttpBinding 处的绑定没有名为“wsHttpBinding_ICustomersService”的已配置绑定。这是 bindingConfiguration 的无效值。(C:\Users\Lara\Documents\Visual Studio 2010\Projects\CustomerServiceDemo\WebClient\web.config 第 25 行)App_WebReferences/CustomersService/。