2012-12-26 12 views
5

मेरे कोड में मैं डब्ल्यूसीएफ अनुरोध https:// एंडपॉइंट पर करता हूं। कभी कभी WCF सर्वर के लिए पहुँच योग्य नहीं होगा जो भी कारण और फिर मेरी कोड निकलेगा और अपवाद:क्लाइंट डब्ल्यूसीएफ सर्वर से कनेक्ट नहीं होने पर मुझे "सर्वर स्टैक ट्रेस" के साथ अपवाद क्यों मिलता है?

Server stack trace: <<<< THE QUESTION IS ABOUT THIS VERY LINE 
    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) 
    at [my code here invoking an OperatiionContract-attributed method 

और .InnerException एक और TimeoutException है:

System.TimeoutException 
The request channel timed out while waiting for a reply after 00:01:00. 
Increase the timeout value passed to the call to Request or increase 
the SendTimeout value on the Binding. The time allotted to this operation 
may have been a portion of a longer timeout. 

और अपवाद की .StackTrace निम्नलिखित पाठ होता है निम्न संदेश के साथ:

The HTTP request to 'https://management.core.windows.net/subscription-id-here/ 
    services/hostedservices/service-name-here/deployments/deployment-id-here' 
has exceeded the allotted timeout of 00:01:00. The time allotted to this 
operation may have been a portion of a longer timeout. 

क्या मैं नहीं मिलता है Server stack trace शब्दों है।

यदि मेरा अनुरोध सर्वर द्वारा भी प्रतिक्रिया नहीं दिया गया है तो यह "सर्वर" क्यों है?

+1

क्या आप वाकई डब्ल्यूसीएफ सेवा प्राप्त नहीं कर रहे हैं? शायद सेवा – sll

+0

पर कुछ अपवाद है '1: 00' के लिए किसी भी टाइमआउट को बढ़ाने का प्रयास करें और देखें कि यह किसी भी बेहतर काम करता है या नहीं। –

+0

@ जॉन सॉंडर्स: जैसे मुझे "सर्वर ट्रेस" का उल्लेख न करने का अपवाद मिलेगा? – sharptooth

उत्तर

0

कनेक्शन के दोनों किनारों पर एक टाइमआउट हो सकता है; ग्राहक या सर्वर। इसलिए आपके अपवाद के आधार पर, मैं कहूंगा कि क्लाइंट सर्वर से जुड़ा हुआ है, लेकिन क्योंकि प्रतिक्रिया समय पर उत्पन्न नहीं हुई थी (sendTimeout के लिए सर्वर की बाइंडिंग के आधार पर), डब्ल्यूसीएफ ने जवाब दिया जैसा आपने देखा है।

टाइमआउट सेटिंग्स पर थोड़ी अधिक जानकारी के लिए http://msdn.microsoft.com/en-us/library/hh924831(v=vs.110).aspx देखें।

संबंधित मुद्दे

 संबंधित मुद्दे