I have Client/Server application that uses service discovery:
Server:
using (ServiceHost host = new ServiceHost(Instance, baseAddress))
{
try
{
host.Description.Behaviors.Add(new ServiceDiscoveryBehavior());
host.AddServiceEndpoint(new UdpDiscoveryEndpoint());
...
host.Open();
while (!Program.IsExit && !cancel)
{
Thread.Sleep(50);
}
host.Close();
}
catch (Exception ex)
{
....
}
Discovering service:
DiscoveryClient discoveryClient = new DiscoveryClient(new UdpDiscoveryEndpoint());
var services = discoveryClient.Find(new FindCriteria(typeof(IUpdateServerService)));
discoveryClient.Close();
On local machine this works fine. Service is found. On the other hand when someone runs client on other machine service seem not to be found (Client should register itself on Server but it does not).
What can be wrong? My thirst thought is that UDP traffic can be blocked by firewall. How can I change that not to use UDP? All clients and Server are in the same domain.