C# 未找到发现终结点,超时异常

C# 未找到发现终结点,超时异常,c#,wcf,C#,Wcf,我正在加载一个主机,其中包含一个名为service的服务,该服务实现契约iSeries设备。 该绑定是WSDualHttpBinding var host = new ServiceHost(typeof(Service)); host.Description.Behaviors.Add(new ServiceDiscoveryBehavior()); host.AddServiceEndpoint(typeof(IService),new WSDualHttpBinding() ,endPoi

我正在加载一个主机,其中包含一个名为service的服务,该服务实现契约iSeries设备。 该绑定是WSDualHttpBinding

var host = new ServiceHost(typeof(Service));
host.Description.Behaviors.Add(new ServiceDiscoveryBehavior());
host.AddServiceEndpoint(typeof(IService),new WSDualHttpBinding()
,endPointAddress);
在客户端,我试图发现端点

EndpointAddress address = new EndpointAddress(new Uri(string.Format("http://{0}:{1}/Service/Client/Discovery", Environment.MachineName, "1111")));Environment.MachineName, 1111);
DiscoveryClient client =
new DiscoveryClient(new DiscoveryEndpoint(new WSDualHttpBinding(), address));
            FindResponse find = client.Find(new FindCriteria(typeof(IService))
{ Duration = TimeSpan.FromSeconds(3) });
它不起作用。。。我在一分钟后无缘无故收到超时异常。 我在同一台机器上运行主机和客户端

有人能发现问题所在吗


谢谢

这有可能是您的代码输入错误吗?“/Serviec/”不抱歉,它不在我的代码中,我编辑了邮递邮件。您应该在url http://{0}:{1}/Servie/Client/Discovery中添加一个“s”。您已经编写了服务来代替服务。您的防火墙有没有可能阻止UDP通信?没有,我在其他程序中使用UDP,我没有任何问题。。。无论如何,我这里不使用UDP