操作超时异常 [英] Operation Timeout Exception

查看:73
本文介绍了操作超时异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行我的应用程序时,出现以下异常.

While running my application I am getting the following Exception.

The request channel timed out while waiting for a reply after 00:00:59.9990000. 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.


有人可以为此建议解决方案吗?


Can anybody suggest a solution for this?

推荐答案

在绑定配置中,有四个超时值1)openTimeout顾名思义就是您所花费的时间"当您打开与WCF服务的连接时,愿意等待. 2)closeTimeout是关闭连接的时间量3)sendTimeout,它表示客户端将等待WCF服务的响应的时间4)receiveTimeout有点像sendTimeout的镜像.

要解决您的问题,您需要将最重要的"sendTimeout"调整为:

In your binding configuration, there are four timeout values 1) openTimeout as the name implies is the amount of time you''re willing to wait when you open the connection to your WCF service. 2)closeTimeout is the amount of time when you close the connection 3) sendTimeout, which says how long the client will wait for a response from your WCF service 4) receiveTimeout is a bit like a mirror for the sendTimeout.

To fix your issue, you need to tweak the most important ''sendTimeout'' as:

<bindings>
  <basichttpbinding>
    <binding name="IncreasedTimeout">
             sendTimeout="00:25:00">
    </binding>
  </basichttpbinding>
</bindings>


阅读以下内容: http://stackoverflow.com/questions/1305389/sql-server-access-with-wcf-timeout [
Read the following: http://stackoverflow.com/questions/1305389/sql-server-access-with-wcf-timeout[^]


这篇关于操作超时异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆