gpt4 book ai didi

silverlight - 对* .svc的HTTP请求已超过分配的超时。分配给该操作的时间可能是较长超时的一部分。

转载 作者:行者123 更新时间:2023-12-03 14:42:44 26 4
gpt4 key购买 nike

我一直在使用WCF开发Silverlight应用程序。

问题是有时会抛出异常,说明:

“对'http:// localhost:1276 / Foo.svc'的HTTP请求已超过分配的超时。分配给该操作的时间可能是较长超时的一部分。”

那么如何增加时间跨度?一些建议在Web配置和service.client配置文件中建议使用接收超时,如下所示

 <bindings>
<customBinding >
<binding name="customBinding0" receiveTimeout="02:00:00" >
<binaryMessageEncoding maxReadPoolSize="2147483647" maxWritePoolSize="2147483647" maxSessionSize="2147483647" />


<httpTransport maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Buffered"/>

</binding>
</customBinding>
</bindings>


receiveTimeout属性的最大值是多少?

最佳答案

我想问题不在于您的ReceiveTimeout超出了该设置的最大值,因为TimeSpan的MaxValue已超过1000万天。相反,我认为这些设置没有生效。

您应该尝试根据this blog post增加服务器和客户端的超时值:

在服务器上(在您的web.config中)

<binding name="customBinding0" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00">


在客户端上(在ServiceReferences.ClientConfig中)

<binding name="CustomBinding_DesignOnDemandService" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00">

关于silverlight - 对* .svc的HTTP请求已超过分配的超时。分配给该操作的时间可能是较长超时的一部分。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4133403/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com