是否可以使用相同的方案HTTP实现多个服务?
像这样:
<system.serviceModel>
<services>
<service name="MyServiceBecouseError.MyNameService" behaviorConfiguration="mexBehaviors">
<endpoint address="xxx" binding="basicHttpBinding" contract="MyServiceBecouseError.IMyNameService"></endpoint>
<endpoint address="yyy" binding="basicHttpBinding" contract="MyServiceBecouseError.IMyNameServiceSecond"></endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/eff-off"/>
<add baseAddress="http://localhost:5555/eff-off"/>
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
答案 0 :(得分:0)
是的,这是可能的。 因此,您可以通过以下方式收听您的两项服务:
当然,元数据交换端点也会存在。