title: WCF discovery doesn't work between two computers on the same subnet with the firewall turned off
body: <p>This simple WCF discovery example works on a single machine but when the client and server are running on separate machines in the same subnet with no firewall, it doesn't work. What am I missing?</p>
  
  <pre class="lang-cs prettyprint-override"><code>using System;
  using System.Linq;
  using System.Net;
  using System.Net.Sockets;
  using System.ServiceModel;
  using System.ServiceModel.Discovery;
  
  namespace WCFDiscovery
  {
     class Program
     {
        static void Main(string[] args)
        {
           try { if (args.Length &gt; 0) StartClient(); else StartServer(); }
           catch (Exception ex) { Console.WriteLine(ex); }
           finally { Console.WriteLine("press enter to quit..."); Console.ReadLine(); }
        }
  
        private static void StartServer()
        {
           var ipAddress = Dns.GetHostAddresses(Dns.GetHostName()).First(ip =&gt; ip.AddressFamily == AddressFamily.InterNetwork);
           var address = new Uri(string.Format("net.tcp://{0}:3702", ipAddress));
           var host = new ServiceHost(typeof(Service), address);
           host.AddServiceEndpoint(typeof(IService), new NetTcpBinding(), address);
           host.Description.Behaviors.Add(new ServiceDiscoveryBehavior());
           host.AddServiceEndpoint(new UdpDiscoveryEndpoint());
           host.Open();
           Console.WriteLine("Started on {0}", address);
        }
  
        private static void StartClient()
        {
           var dc = new DiscoveryClient(new UdpDiscoveryEndpoint());
           Console.WriteLine("Searching for service...");
           var findResponse = dc.Find(new FindCriteria(typeof(IService)));
           var response = ChannelFactory&lt;IService&gt;.CreateChannel(new NetTcpBinding(), findResponse.Endpoints[0].Address).Add(1, 2);
           Console.WriteLine("Service response: {0}", response);
        }
     }
  
     [ServiceContract] interface IService { [OperationContract] int Add(int x, int y); }
  
     class Service : IService { public int Add(int x, int y) { return x + y; } }
  }
  </code></pre>