Nel mio codice faccio richieste WCF a un endpoint https://
. A volte il server WCF sarà irraggiungibile per qualsiasi motivo e quindi il mio codice produrrà e un'eccezione:Perché ottengo un'eccezione con "traccia dello stack del server" quando il client non riesce nemmeno a connettersi al server 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.
e la .StackTrace
dell'eccezione contiene il seguente testo:
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
e il .InnerException
è un altro TimeoutException
con il seguente messaggio:
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.
Quello che non capisco è il Server stack trace
fraseggio.
Perché è "server" se la mia richiesta non ha nemmeno ricevuto risposta dal server?
Sei sicuro che le richieste dei client non abbiano raggiunto il servizio WCF? Forse c'è qualche eccezione sul servizio – sll
Prova ad aumentare i timeout che sono per '1: 00' e vedere se funziona meglio. –
@John Saunders: Come riceverò un'eccezione senza menzionare "traccia del server"? – sharptooth