没有端点监听 [英] There was no endpoint listening
问题描述
专家,
我在Windows 7计算机中部署了一个 WCF服务.
一切正常.
我在WinCE 5.0 Device中有一个紧凑框架3.5的桌面应用程序,它每30秒就会连接一次以上服务.
现在需要一些时间才能正常工作.但有时它会在设备上显示以下错误.
在http://MyIPAddress:port/service1.svc上没有侦听终结点的端点可以接受该消息.这通常是由不正确的地址或SOAP操作引起的.有关更多详细信息,请参见InnerException(如果存在).
2012年9月14日2:55:54 URL URL http://MyIPAddress:port/service1.svc
怎么可能,我听不懂.
如果有的话,请提供解决方案.
在此先谢谢您
hi experts,
I have one WCF Service deployed in Windows 7 computer.
It is working fine.
I have a Desktop Application of compact framework 3.5 in WinCE 5.0 Device which is connecting above service at every 30 second.
It is some time working fine. but some time it is giving below error on device.
There was no endpoint listening at http://MyIPAddress:port/service1.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
9/14/2012 2:55:54 PM URL http://MyIPAddress:port/service1.svc
how it is possible, i can not understand.
Please provide solution if you have.
Thanks in advance
推荐答案
在您的代码中使用它初始化您的Service对象
Use it in your code where you intialize your Service object
var binding = new BasicHttpBinding();
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
binding.MaxReceivedMessageSize = Int32.MaxValue;
binding.ReaderQuotas.MaxBytesPerRead = Int32.MaxValue;
binding.ReaderQuotas.MaxArrayLength = Int32.MaxValue;
binding.ReaderQuotas.MaxDepth = Int32.MaxValue;
binding.ReaderQuotas.MaxNameTableCharCount = Int32.MaxValue;
binding.ReaderQuotas.MaxStringContentLength = Int32.MaxValue;
binding.ReceiveTimeout = new TimeSpan(24, 0, 0);
EndpointAddress ep = new EndpointAddress("yourEndPoint");
YourService m_MyService = new YourService.SomeService(binding, ep);
这篇关于没有端点监听的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!