2013-02-20 13 views
5

Ho un numero di servizi WCF, in esecuzione su IIS su un server dedicato. Questi servizi hanno i loro clienti. Tutto sommato funziona, ma ogni volta che guardo il backup dei registri a livello di client, di solito vedere questi tipi di errori:Costante "System.ServiceModel.EndpointNotFoundException: nessun endpoint in ascolto su <Service URL>" errori

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) 

Ma subito dopo che questo stesso programma avrebbe inviare richieste che avrebbero funzionato correttamente.

Questa è la configurazione del servizio 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> 

e

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

comportamento di servizio:

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

Penso che ci può essere un limite da qualche parte per esimo e numero di connessioni simultanee. O forse è qualcosa nelle impostazioni IIS o qualcosa nella configurazione del servizio . Ma non riesco a trovare cosa e dove.

Inoltre, la configurazione NetTcpBinding ha una proprietà MaxConnection, ma non basicHttpBinding.

Grazie mille in anticipo per il vostro aiuto!

+1

Benvenuti in SO! Ho modificato il tuo post per renderlo più chiaro agli utenti di Stackoverflow. Assicurati che alla risposta alla tua domanda, contrassegni la risposta se risolve il tuo problema! – Brian

+0

Includere la configurazione 'Servizi' dalla sezione' system.serviceModel' di 'web.config'. –

risposta

0

Di seguito è la versione risolta del mio proprio Web.config (adatto per il mio progetto). Suggerimenti utili possono essere scelti dal seguente campione funzionante. - Sujayyendhiren

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