gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 21:40:36 33 4
gpt4 key购买 nike

我试图找到下面 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"

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

    我应该补充一点,浏览器可以使用计算机名称完全访问端点。但是,当应用程序进行调用时,它根本不起作用。

    关于.net - EndpointNotFoundException 的可能原因是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15164550/

    33 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com