Using managed ServiceDiscovery
The ad-hoc auto-discoverable service recipe demonstrates using the built-in discovery endpoint for automatic service publishing, which is simple and convenient. However, sometimes we may need a more advanced service-discovering functionality for our WCF service. For example, we may need to make the auto-discovery feature go across different subnets in the local network or we may need to perform some filtering against all the discoverable services. Fortunately, WCF provides interfaces for us to build a custom discovery proxy for service announcement and service probing.
In this recipe, we will show you how to create a custom service-discovery proxy through the WCF built-in discovery extension types.
How to do it...
Create a custom
DiscoveryProxy
type.The first thing to do is create a custom type derived from the
DiscoveryProxy
class. This class is the main component for processing WCF service publishing and service-probing requests. It is also required that the...