【发布时间】:2023-03-02 22:36:02
【问题描述】:
我的配置如下。
<bindings>
<basicHttpBinding>
<!-- This binding is used when connecting to services secured using SSL (e.g. when accessible over internet/WAN) -->
<binding name="SecuredBasicHttpBinding" closeTimeout="10675199.02:48:05.4775807"
openTimeout="10675199.02:48:05.4775807" receiveTimeout="10675199.02:48:05.4775807" sendTimeout="10675199.02:48:05.4775807"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxStringContentLength="16384" />
<security mode="Transport">
<transport clientCredentialType="Basic" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
我想为 closetimeout、opentimeout..etc 设置最大值。 我从下面的 url 得到这个值 10675199.02:48:05.4775807。但它没有用。
How can I set the receiveTimeout and sendTimeout to infinity with this WCF contact?
可以设置的超时最大值是多少?
【问题讨论】:
-
我不直接知道答案,但我想建议您三思而后行。目的是什么?想要无限期地等待“答案”。
-
什么实际上不起作用?编译时错误?运行时错误?
-
实际上我的一些服务正在返回超时预期,所以想要设置超时的最大值就是目标
-
我不应该将其设置为最大值。那是多长时间?你要等待最大值吗?考虑根据操作的长度将其设置为实际值。恕我直言,也许 1 或 5 分钟已经很多了。