c# – WCF中端点的基址

我正在使用WCF并希望创建3个端点:basicHttpBinding,netTcpBinding和wsHttpBinding.

我已指定2个端点如下:

<endpoint address="StringManipulationService" binding="basicHttpBinding"
    contract="StringManipulationService.IStringManipulation" />
  <endpoint address="StringManipulationService" binding="netTcpBinding"
    contract="StringManipulationService.IStringManipulation" />

和指定的基地址如下:

    <baseAddresses>
      <add baseAddress="http://localhost:8080/" />
      <add baseAddress="net.tcp://localhost:8090/" />
    </baseAddresses>

但我不知道如何编写wsHttpBinding的基地址,无法在任何地方找到它.请帮忙.谢谢.

最佳答案

 <appSettings> 
      <add key="baseAddress" value="localhost:8000"; /> 
 </appSettings> 



 <endpoint address="" binding="wsHttpBinding"
 contract="StringManipulationService.IStringManipulation" />
点赞