wcf服务:在指定发送超时之前获取早期超时异常 [英] wcf service : getting early timeout exception before send timeout specified

查看:52
本文介绍了wcf服务:在指定发送超时之前获取早期超时异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个wcf服务,我们已经将发送超时作为200毫秒但是当我们调用该服务的方法时,出现以下错误

已超过分配的超时00:00:00.1680000。分配给此操作的时间

可能是较长超时的一部分。操作已超时




这里的分配超时显示为168ms,而我们在配置中提到发送超时为200ms。



bindingconfigutation如下:



 < ;   binding     name  < span class =code-keyword> =  TestBinding    maxReceivedMessageSize   =  2147483647    closeTimeout   =  00:00:00.200    maxBufferPoolSize   =  2147483647    messageEncoding   = 文字    textEncoding   =  utf-8    openTimeout   =  00:00:00.200    receiveTimeout   =  00:00:00.200    sendTimeout   =  00:00:00.200   >  
< readerQuotas maxDepth = 2147483647 maxStringContentLength = 2147483647 maxArrayLength = 2147483647 maxBytesPerRead = 4096 maxNameTableCharCount = 16384 / >
< 安全性 mode = 传输 >
< transport clientCredentialType = 证书 / >
< / security >
< / binding >









不确定为什么服务在指定的超时之前超时。任何帮助将不胜感激。



提前致谢,

Manisha

解决方案

< blockquote>我使用了receivetimeout属性并且工作正常。


Hi All,
I have a wcf service for which we have given the "send timeout" as 200ms but when we are calling the method of that service,the following error is
"has exceeded the allotted timeout of 00:00:00.1680000. The time
allotted to this operation may have been a portion of a longer timeout. The operation has timed out"


Here the alloted timeout is showing as "168ms" while we have mentioned the send timeout as 200ms in the configuration.

The bindingconfigutation is as follows:

<binding name="TestBinding" maxReceivedMessageSize="2147483647" closeTimeout="00:00:00.200" maxBufferPoolSize="2147483647" messageEncoding="Text" textEncoding="utf-8" openTimeout="00:00:00.200" receiveTimeout="00:00:00.200" sendTimeout="00:00:00.200" >
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="Certificate" />
          </security>
        </binding>





Not sure why the service is timing out before specified timeout. Any help would be appreciated.

Thanks in advance,
Manisha

解决方案

I used receivetimeout property and it worked.


这篇关于wcf服务:在指定发送超时之前获取早期超时异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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