Standard Endpoints and MexBindings

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




WCF 4.0 provides few so called standard endpoints:

UdpDiscoveryEndpointElement : DiscoveryEndpointElement

They can be used to add some specific features to service. For example udpDiscoveryEndpoint enables add-hoc discovery of the service. This endpoint according to specification provides discovery of the service address. Unfortunately, this does not provide information about the binding and other service policies. To make this happen, there is mexEndpoint which enables metadata exchange. The mexEndpoint provides following bindings:

MexHttpBindingElement, MexHttpsBindingElement, MexNamedPipeBindingElement and MexTcpBindingElement.

Here is one example, which enables discovery of address (udpDiscovery) and whole binding with policies (mex):


      <service name="Daenet.DNetfx40Discovery.SampleService">

        <endpoint name="Daenet.DNetfx40Discovery.ISampleService" binding="wsHttpBinding" contract="Daenet.DNetfx40Discovery.ISampleService" />     


       <endpoint kind="udpDiscoveryEndpoint"/>


       <endpoint kind = "mexEndpoint" address = "MEX" binding = "mexTcpBinding" />



Posted Feb 22 2010, 10:12 PM by Damir Dobric is a .Net Community Blog powered by daenet GmbH.