第一种解决方法:最暴力的
配置去掉<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
第二种解决方法:
其实已经有了serviceBehavior,但是忘记绑定到Service上了
<service behaviorConfiguration="serviceBehavior" name="ZBMService.ObtainData">
<endpoint address="ObtainData" binding="wsHttpBinding" bindingConfiguration="Binding1"
contract="ZBMServiceContract.IObtainData" />
<endpoint address="mex" binding="wsHttpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
</service>
给Service的BehaviorConfiguration指定之前创建的ServiceBehavior
时间: 2024-11-08 23:41:24