简体   繁体   English

(WCF服务)切换开/关发现端点

[英](WCF Service) Toggle on/off discovery endpoint

I'm developing a simple WCF-based application. 我正在开发一个基于WCF的简单应用程序。

My service is very simple, just 2 endpoints: 1) The service 2) updDiscovery 我的服务非常简单,只有两个端点:1)服务2)updDiscovery

<services>
    <service name="myService">
        <endpoint address="http://192.168.1.18/service"/>
        <endpoint name="udpDiscovery" kind="udpDiscoveryEndpoint" endpointConfiguration="adhocDiscoveryEndpointConfiguration"/>
    </service>
</services>

It works great but I'd toggle on/off the discoverability of my service. 效果很好,但是我可以打开/关闭服务的可发现性。 I tried to change the Enable parameter but it doesn't work. 我试图更改Enable参数,但是它不起作用。

Can you help me please? 你能帮我吗?

Cheers Mauro 干杯毛罗

Add a behaviousConfiguration to your udpDiscovery end-point. 将一个behaviousConfiguration添加到您的udpDiscovery端点。 Within the behaviour, put <endpointDiscovery enabled="false"/> 在行为内,放入<endpointDiscovery enabled="false"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM