没有端口号的WCF端点地址

时间:2016-06-06 17:36:16

标签: wcf

我的端点地址中没有端口号的WCF服务。我想知道如何分配端口?

服务端点

<services>
   <service behaviorConfiguration="CalServiceBehavior" name="Test.Services.CI.Cal1Service">
      <endpoint address="" binding="netTcpBinding" bindingConfiguration="NetTcpBinding" name="Cal1Service" contract="Test.Services.Cal1.ICal1Service" />                
   </service>
   <service behaviorConfiguration="CalServiceBehavior" name="Test.Services.CI.Cal2Service">
      <endpoint address="" binding="netTcpBinding" bindingConfiguration="NetTcpBinding" name="Cal2Service" contract="Test.Services.Cal2.ICal2Service" />        
   </service>
</services>

客户端端点

<client>
    <endpoint name="cal1" address="net.tcp://100.100.11.4/Test.Services.Cal1/Cal1Service.svc" binding="netTcpBinding" bindingConfiguration="NetTcpBinding" contract="Test.Services.Cal1.ICal1Service"/>
    <endpoint name="cal2" address="net.tcp://100.100.11.4/Test.Services.Cal2/Cal2Service.svc" binding="netTcpBinding" bindingConfiguration="NetTcpBinding" contract="Test.Services.Cal2.ICal2Service"/>
</client>

0 个答案:

没有答案