在我的代码中,我向https://
端点发出 WCF 请求。有时,无论出于何种原因,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.
并且.StackTrace
异常的包含以下文本:
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
带有以下消息的消息:
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
措辞。
如果我的请求甚至没有得到服务器的响应,为什么它是“服务器”?