我在客户端应用程序的app配置中有这个配置:
<system.serviceModel>
<bindings>
<customBinding>
<binding name="netHttpBinding_ICalculadora" sendTimeout="00:05:00">
<binaryMessageEncoding compressionFormat="Deflate" />
<tcpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://localhost:8733/Design_Time_Addresses/WCFCalculadoraService/Service1/"
binding="netHttpBinding" bindingConfiguration="netHttpBinding_ICalculadora"
contract="WCFCalculadoraService.ICalculadoraService" name="NetHttpBinding_ICalculadoraService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
但是我收到一条错误消息,说我没有配置名称&#34; netHttpBinding_ICalculadora&#34;,但我有一个带有此名称的自定义绑定配置。为什么我会收到此错误?
非常感谢。
答案 0 :(得分:1)
可能这就是问题 -
组 binding =“customBinding”而不是binding =“netHttpBinding”