views:

214

answers:

1
  1. I know I can expose multiple netTcpBinding endpoints in the same port.
  2. I know I can't expose an endpoint in the same port used by IIS.
  3. What about multiple webHttpBinding endpoints in the same port?
+1  A: 

every Address, Binding, Contract combination in WCF must be unique, In other words you can have multiple Contracts (IService1,IService2) on the same binding (webHttp or Http) with the same address (http://localhost:8080/MyService)

 <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"/>

Three custom endpoints above, with the same binding, and the same address, different Contracts

Neil