You are developing a self-hosted WCF service that returns stock market information. The service must be
discoverable by any client application. You need tobuild the service host. How should you build the host?
Leave a Reply to Stefan Cancel reply
new UdpDiscoveryEndpoint
Based on http://www.codeproject.com/Articles/469549/WCF-Discovery, this is incorrect. UDP limits to LAN, and this needs to be “discoverable by any client”.
Should be: host.AddServiceEndpoint(new UdfDiscoveryEndpoint());
https://msdn.microsoft.com/en-us/library/dd456783(v=vs.110).aspx
See above: Based on http://www.codeproject.com/Articles/469549/WCF-Discovery, this is incorrect. UDP limits to LAN, and this needs to be “discoverable by any client”.
I take that back: “UdpBinding is useful in scenarios where a service needs to send out small messages to a number of clients simultaneously. A stock ticker application is an example of such a service.” https://msdn.microsoft.com/en-us/library/hh556229%28v=vs.110%29.aspx
To configure the service for discovery, we need to add the standard udpDiscoveryEndpoint endpoint as well as need to enable the serviceDiscovery behavior on the service.