2013-02-20 59 views
5

मेरे पास WCF सेवाओं की संख्या है, जो समर्पित सर्वर पर IIS पर चल रही है। इन सेवाओं में उनके ग्राहक हैं। सभी सभी में यह काम करता है, लेकिन जब भी मैं ग्राहक के स्तर पर लॉग देखो, मैं आमतौर पर त्रुटियों की तरह देखें:निरंतर "System.ServiceModel.EndpointNotFoundException: <Service URL> पर कोई एंडपॉइंट सुनना नहीं था" त्रुटियां

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) 

लेकिन सही होने के बाद कि यह वही कार्यक्रम अनुरोध करता है कि सही ढंग से काम करेगा भेजना होगा।

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

मैं के लिए कहीं न कहीं एक सीमा होती हो सकता है लगता है

यह WCF सेवा के विन्यास है वें एक साथ कनेक्शन की संख्या। या शायद IIS सेटिंग्स या WCF सेवा कॉन्फ़िगरेशन में कुछ ऐसा हो सकता है। लेकिन मुझे नहीं पता कि कहां और कहाँ है।

इसके अलावा, NetTcpBinding विन्यास एक संपत्ति MaxConnection है, लेकिन basicHttpBinding नहीं करता है।

आपकी मदद के लिए बहुत पहले से धन्यवाद!

+1

में आपका स्वागत है अतः करने के लिए! मैंने स्टैक ओवरफ्लो के उपयोगकर्ताओं को इसे और स्पष्ट करने के लिए अपनी पोस्ट संपादित की है। सुनिश्चित करें कि जब आपके प्रश्न का उत्तर दिया जाता है, तो अगर आप अपनी समस्या हल करते हैं तो आप उत्तर को चिह्नित करते हैं! – Brian

+0

अपने 'web.config' system.serviceModel' से 'सेवा' कॉन्फ़िगरेशन शामिल करें। –

उत्तर

0

मेरे अपने वेब.कॉन्फिग (मेरे प्रोजेक्ट के लिए उपयुक्त) का हल संस्करण है। निम्नलिखित संकेत नमूने से उपयोगी संकेतों को चुना जा सकता है। - Sujayyendhiren

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