Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net EndpointNotFoundException的可能原因是什么?_.net_Wcf_Wcf 4 - Fatal编程技术网

.net EndpointNotFoundException的可能原因是什么?

.net EndpointNotFoundException的可能原因是什么?,.net,wcf,wcf-4,.net,Wcf,Wcf 4,我试图找到下面EndpointNotFoundException异常的潜在原因(发生在客户端,异常是间歇性的)。异常消息描述了两种可能的原因: 没有端点侦听 不正确的SOAP操作 我验证了两者,端点和SOAP操作都可用。网络配置似乎是正确的,所有机器都已启动、运行且负载很轻。我还检查了代理(没有)、并发性(maxConcurrentConnection增加)和性能计数器(一切正常)。这可能是由于客户端库(我们是代理池)中的错误导致的,在该错误中,代理处于故障状态,或者某个套接字从未关闭 简而

我试图找到下面EndpointNotFoundException异常的潜在原因(发生在客户端,异常是间歇性的)。异常消息描述了两种可能的原因:

  • 没有端点侦听
  • 不正确的SOAP操作
我验证了两者,端点和SOAP操作都可用。网络配置似乎是正确的,所有机器都已启动、运行且负载很轻。我还检查了代理(没有)、并发性(maxConcurrentConnection增加)和性能计数器(一切正常)。这可能是由于客户端库(我们是代理池)中的错误导致的,在该错误中,代理处于故障状态,或者某个套接字从未关闭

简而言之,我想知道是什么可能导致客户端代理中出现间歇性异常

Exception: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://production.com/MyService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 11.11.111.11:443 
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) 
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) 
--- End of inner exception stack trace --- 
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) 
at System.Net.HttpWebRequest.GetRequestStream() 
at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() 
--- End of inner exception stack trace --- 

Server stack trace: 
at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() 
at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout) 
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout) 
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) 
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) 
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) 
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 

Exception rethrown at [0]: 
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) 
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 

我也有同样的问题。在我的例子中,将计算机名替换为IP有效。我知道这没什么意义

不起作用:

<endpoint address="http://MyComputerName:82/MyApplication/MyPath/MyWebService.asmx"

我建议生成WCF跟踪。这通常比异常更详细地说明了出错的原因。这是一个发生在客户端而不是服务器端的异常。您可以在任何一方创建跟踪。我遇到了同样的间歇性问题,您知道发生了什么吗?
<endpoint address="http://172.XX.X.X:82/MyApplication/MyPath/MyWebService.asmx"