W moim kodzie wykonuję żądania WCF do punktu końcowego https://
. Czasami serwer WCF będzie nieosiągalny dla jakiegokolwiek powodu i wtedy mój kod przyniesie i wyjątek:Dlaczego otrzymuję wyjątek z "śledzeniem stosu serwerów", gdy klient nie może połączyć się z serwerem WCF?
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.
i .StackTrace
wyjątku zawiera następujący tekst:
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
i .InnerException
jest kolejnym TimeoutException
z następującą wiadomością:
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.
To, czego nie otrzymuję, to frazowanie Server stack trace
.
Dlaczego jest to "serwer", jeśli na moje żądanie nie zareagował serwer?
Czy jesteś pewien, że żądania klientów nie osiągnęły usługi WCF? Być może jest jakiś wyjątek dotyczący usługi – sll
Spróbuj zwiększyć czas oczekiwania dla '1: 00' i sprawdź, czy działa lepiej. –
@John Saunders: Tak jak otrzymam wyjątek, nie wspominając o "śledzeniu serwera"? – sharptooth