我正在使用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" />
关于c# - WCF中端点的基地址,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42758501/