简体   繁体   中英

(WCF Service) Toggle on/off discovery endpoint

I'm developing a simple WCF-based application.

My service is very simple, just 2 endpoints: 1) The service 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.

Can you help me please?

Cheers Mauro

Add a behaviousConfiguration to your udpDiscovery end-point. Within the behaviour, put <endpointDiscovery enabled="false"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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