"错误-6ren"> "错误-我有多个WCF服务,运行于 IIS在专用服务器上。这些服务有他们的客户。总而言之它有效,但是每当我在客户端级别查找日志时,我通常会看到以下类型的错误: System.ServiceModel.Endp-6ren">
gpt4 book ai didi

wcf - 常量 "System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at "错误

转载 作者:行者123 更新时间:2023-12-03 18:04:09 25 4
gpt4 key购买 nike

我有多个WCF服务,运行于 IIS在专用服务器上。这些服务有他们的客户。总而言之它有效,但是每当我在客户端级别查找日志时,我通常会看到以下类型的错误:

System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at <Service URL> 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 socket operation was attempted to an unreachable network <Service IP>:80
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, Int32 timeout, 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.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.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)

但在此之后,这个相同的程序会发送可以正常工作的请求。

这是 WCF的配置服务:
<netTcpBinding>
<binding name="config" closeTimeout="0:5:0" openTimeout="0:5:0" sendTimeout="0:5:0" receiveTimeout="0:5:0"
maxBufferPoolSize="8388608" maxBufferSize="8388608" maxReceivedMessageSize="8388608" maxConnections="8388608">
<readerQuotas maxArrayLength="8388608" maxNameTableCharCount="8388608" maxStringContentLength="8388608"/>
<security mode="None"/>
</binding>
</netTcpBinding>


<basicHttpBinding>
<binding name="config2" closeTimeout="0:5:0" openTimeout="0:5:0" sendTimeout="0:5:0" receiveTimeout="0:5:0"
maxBufferPoolSize="838860800" maxBufferSize="838860800" maxReceivedMessageSize="838860800">
<readerQuotas maxArrayLength="838860800" maxNameTableCharCount="838860800" maxStringContentLength="838860800"/>
<security mode="None"/>
</binding>
</basicHttpBinding>

服务行为:
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="false"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
<dataContractSerializer maxItemsInObjectGraph="838860800"/>
</behavior>

我认为同时连接的数量可能有限制。或者也许它在 IIS 中的东西 WCF 中的设置或其他内容服务配置。但我找不到什么和在哪里。

另外, NetTcpBinding配置有一个属性 MaxConnection ,但是 basicHttpBinding才不是。

非常感谢您的帮助!

最佳答案

以下是我自己的 Web.config 的已解决版本(适用于我的项目)。可以从以下工作示例中挑选有用的提示。 ——苏贾延希伦

  <service name="WelcomeSOAPXMLService">
<endpoint address="http://localhost:16672/Service.svc" binding="basicHttpBinding" contract="IWelcomeSOAPXMLService"/>

关于wcf - 常量 "System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at <Service URL>"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14991615/

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