Trong mã của tôi, tôi yêu cầu WCF gửi đến điểm cuối https://
. Đôi khi máy chủ WCF sẽ không thể kết nối với bất kỳ lý do gì và sau đó mã của tôi sẽ mang lại và ngoại lệ:Tại sao tôi nhận được ngoại lệ với "dấu vết ngăn xếp máy chủ" khi máy khách không thể kết nối với máy chủ 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.
và .StackTrace
của ngoại lệ chứa các văn bản sau đây:
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
và .InnerException
là TimeoutException
khác với thông báo sau:
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.
Điều tôi không nhận được là đoạn mã Server stack trace
.
Tại sao lại là "máy chủ" nếu yêu cầu của tôi thậm chí không được máy chủ trả lời?
Bạn có chắc chắn rằng yêu cầu của khách hàng không đạt đến WCF serivce? Có lẽ có một số ngoại lệ về dịch vụ – sll
Thử tăng bất kỳ thời gian chờ nào cho '1: 00' và xem liệu nó có hoạt động tốt hơn hay không. –
@John Saunders: Giống như tôi sẽ nhận được ngoại lệ không đề cập đến "theo dõi máy chủ"? – sharptooth