答案 0 :(得分:2)
WCF中的每个地址,绑定,合同组合必须是唯一的,换句话说,您可以在具有相同地址(http://localhost:8080/MyService)<的相同绑定(webHttp或Http)上拥有多个合同(ITransactService,IQueryService) / p>
<endpoint name="MyServiceTrans" binding="customBinding"
bindingConfiguration="secureBinaryHttpBinding"
contract="MyService.SL.ITransactService"
behaviorConfiguration="MyCustomEndpointBehavior"/>
<endpoint name="MyServiceQuery" binding="customBinding"
bindingConfiguration="secureBinaryHttpBinding"
contract="MyService.SL.IQueryService"
behaviorConfiguration="MyCustomEndpointBehavior"/>
<endpoint name="MyServiceAdmin" binding="customBinding"
bindingConfiguration="secureBinaryHttpBinding"
contract="MyService.SL.IAdminService"
behaviorConfiguration="MyCustomEndpointBehavior"/>
上面有三个自定义端点,具有相同的绑定和相同的地址,不同的合同