2013-02-20 4 views
5

Ich habe eine Reihe von WCF Dienste, die auf IIS auf einem dedizierten Server ausgeführt werden. Diese Dienste haben ihre Kunden. Alles in allem funktioniert es, aber wenn ich die Protokolle auf der Client-Ebene sehen, ich in der Regel diese Art von Fehler sehen:Constant "System.ServiceModel.EndpointNotFoundException: Es gab keinen Endpunkt zu hören bei <Service URL>" Fehler

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) 

Aber gleich danach das gleiche Programm senden würde Anfragen, die richtig funktionieren würde.

Dies ist die Konfiguration des WCF Service:

<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> 

und

<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> 

Service-Verhalten:

<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> 

ich es denke, für eine Grenze irgendwo sein kann th Die Anzahl der gleichzeitigen Verbindungen. Oder vielleicht ist es etwas in IIS Einstellungen oder etwas in der WCF Service-Konfiguration. Aber ich kann nicht finden, was und wo.

Auch die NetTcpBinding Konfiguration hat eine Eigenschaft MaxConnection, aber basicHttpBinding nicht.

Vielen Dank im Voraus für Ihre Hilfe!

+1

Willkommen zu SO! Ich habe Ihren Beitrag bearbeitet, um ihn für die Benutzer von Stackoverflow klarer zu machen. Stellen Sie sicher, dass Sie bei der Beantwortung Ihrer Frage die Antwort markieren, wenn sie Ihr Problem löst! – Brian

+0

Nehmen Sie die Konfiguration 'Services' aus dem' web.config' 'system.serviceModel'-Abschnitt auf. –

Antwort

0

Folgendes ist die gelöste Version meiner eigenen Web.config (Geeignet für mein Projekt). Nützliche Hinweise können aus dem folgenden Arbeitsprobe ausgewählt werden. - Sujayyendhiren

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