.net - 对 'http:///xxx.svc' 的 HTTP 请求已超出分配的超时时间

标签 .net wcf http .net-remoting

我正在调查以下 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/

相关文章:

c# - 在单行条件中传递空值

c# - 线程池 : Cross-thread operation not valid.

.NET Entity Framework FirstOrDefaultAsync 抛出强制转换错误

c# - 未经客户端身份验证方案 NTLM 授权

c# - 通过 WCF 服务传递枚举

c# - 具有长属性名称的 WCF DataContractSerializer 性能

java - 应在我的应用程序中检查哪些 HTTP 状态代码

c# - 你能在 Using block 中处理多个对象吗?

android - 错误 Android - 收到 HTML 而不是 JSON

http - 对移动设备/应用程序使用 HTTP 推送可能会出现哪些问题?