我正在使用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写入基地址,并且无法在任何地方找到它。请帮忙。谢谢。
答案 0 :(得分:1)
<appSettings>
<add key="baseAddress" value="localhost:8000"; />
</appSettings>
<endpoint address="" binding="wsHttpBinding"
contract="StringManipulationService.IStringManipulation" />