2011-02-15 39 views

回答

3

是的 - 您可以创建3个不同的端点。

<service name ="blahblahblah"> 
    <host> 
     <baseAddresses> 
     <add baseAddress="http://localhost:8011/" /> 
     </baseAddresses> 
    </host> 

    <endpoint address="Stuff" 
      binding="wsHttpBinding" 
      contract="ICalculator" 
      " /> 
    <endpoint address="Stuff" 
      binding="wsHttpBinding" 
      contract="IEcho" 
      /> 
    <endpoint address="OtherEcho" 
      binding="wsHttpBinding" 
      contract="IOtherEcho" 
      /> 
    </service> 

你并不需要三种不同的端口,使用上面的例子,你可以在下面的访问地址您的合同:

http://localhost:8011/IOtherEcho 
http://localhost:8011/IEcho 
http://localhost:8011/ICalculator 
1

1-是的,当然你可以为每个接口创建一个端点。
2-你是什么意思的3个不同的条目?

1

这是可能的。鉴于您创建了一个实现3个接口的类,您可以在配置文件中将3个端点节点添加到您的服务中。