EndpointNotFoundException异常的可能原因是什么?

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

  • 没有端点监听。
  • 不正确的SOAP操作。

我验证了这两个原因,端点是可用的,SOAP动作也是可用的。网络配置似乎是正确的,所有的机器都是正常运行的,而且负载很轻。我还检查了诸如代理(没有)、并发量(maxConcurrentConnection增加了)和性能计数器(一切看起来都正常)。这是否是由于客户端库中的一个bug造成的(我们是池化代理),我们最终的代理处于故障状态或一些socket从未关闭?

简而言之,我想知道是什么原因会导致客户端代理间歇性地出现这种异常。

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"

能用

<endpoint address="http://172.XX.X.X:82/MyApplication/MyPath/MyWebService.asmx"

我需要补充的是,这个端点完全可以通过浏览器使用计算机名来访问,但是,当应用程序进行调用时,它根本无法工作。然而,当应用程序进行调用时,它根本无法工作。

给TA打赏
共{{data.count}}人
人已打赏
解决方案

LaTeX - 在矩阵中编写文本。

2022-4-21 19:09:33

解决方案

如何在Windows下暂停和恢复任何外部进程?

2022-4-21 20:01:43

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索