WCF中的超时配置
非常奇怪的是,对于这个配置,服务实际上只在一分钟内就超时了。 “01:00:00”不是一小时吗?或者对于不同的超时属性,它使用不同的格式?有这方面的文档吗?谢谢!
<binding name="BasicHttpBindingBigMessages"
closeTimeout="00:59:00"
openTimeout="00:59:00"
receiveTimeout="00:59:00"
sendTimeout="00:59:00"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="1000000000"
maxBufferPoolSize="100000000"
maxReceivedMessageSize="1000000000"
messageEncoding="Text"
textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32"
maxStringContentLength="819200"
maxArrayLength="1638400"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
这是我在调试模式下在代码中看到的错误消息:
{“请求通道在 01:00:00 后等待回复时超时。增加传递给 Request 调用的超时值或增加 Binding 上的 SendTimeout 值。分配给此操作的时间可能已较长超时的一部分。”}
It is really weird that for this configuration, the service actually timed out in just one minute. Isn't "01:00:00" one hour? Or for different timeout property, it uses different format? Is there a documentation for this? Thanks!
<binding name="BasicHttpBindingBigMessages"
closeTimeout="00:59:00"
openTimeout="00:59:00"
receiveTimeout="00:59:00"
sendTimeout="00:59:00"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="1000000000"
maxBufferPoolSize="100000000"
maxReceivedMessageSize="1000000000"
messageEncoding="Text"
textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32"
maxStringContentLength="819200"
maxArrayLength="1638400"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
This is the error message I saw in my code in debug mode:
{"The request channel timed out while waiting for a reply after 01:00: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."}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以控制客户端和服务器配置吗?这可能是服务器超时(通过 HttpRuntime 设置)。
Do you have control over the client and server configuration? It could be a timeout on the server (via HttpRuntime setting).
“01:00:00”确实是 1 小时。
WCF 客户端上的默认操作超时为 1 分钟。您是否正确设置了客户端的超时?这里可能超时了。
"01:00:00" is indeed 1 hour.
The default operation timeout on a WCF client is 1 minute. Are you properly setting the timeout on the clients? It could be timing out here.