在客户端配置中,它说我没有名为 xxx 的配置
in the client configuration, it says that I don't have a configuration with the name xxx
我在客户端应用程序的应用程序配置中有此配置:
<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>
但我收到一条错误消息,提示我没有名为 "netHttpBinding_ICalculadora" 的配置,但我有一个带有此名称的自定义绑定配置。为什么会出现此错误?
非常感谢。
可能就是这个问题 -
设置
绑定="customBinding" 而不是绑定="netHttpBinding"
我在客户端应用程序的应用程序配置中有此配置:
<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>
但我收到一条错误消息,提示我没有名为 "netHttpBinding_ICalculadora" 的配置,但我有一个带有此名称的自定义绑定配置。为什么会出现此错误?
非常感谢。
可能就是这个问题 -
设置 绑定="customBinding" 而不是绑定="netHttpBinding"