我正在调查以下 TimeoutException 异常。以前有人遇到过这种情况吗?谁能提出解决方案吗?
我们有一个连接到 WCF 服务的客户端,以通过 HTTP 上传数据负载。最近服务器出问题了。以下是一些异常详细信息:
mscorlib threw TimeoutException The HTTP request to 'http:///xxx.svc' has exceeded the allotted timeout of 00:00:10. The time allotted to this operation may have been a portion of a longer timeout.
Server stack trace: at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeEndService(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
请原谅我的简短。我不是 WCF 专家。任何建议将不胜感激。
我可以增加超时值吗?
最佳答案
您可以增加绑定(bind)的 receiveTimeout
属性。
以下是 MSDN 上的几个链接:
常规:Configuring Services Using Configuration Files
绑定(bind):Configuring Bindings for Windows Communication Foundation Services
关于.net - 对 'http:///xxx.svc' 的 HTTP 请求已超出分配的超时时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14213256/