【发布时间】:2013-11-29 15:53:08
【问题描述】:
我有一个使用 asmx Web 服务的 WCF 服务。对 Web 服务的调用有时会超时。如何增加超时值,最好是在 webconfig 中。
谢谢
【问题讨论】:
我有一个使用 asmx Web 服务的 WCF 服务。对 Web 服务的调用有时会超时。如何增加超时值,最好是在 webconfig 中。
谢谢
【问题讨论】:
您应该能够在 web.config 中调整执行超时。
HttpRuntimeSection.ExecutionTimeout
ExecutionTimeout 属性指示请求在被 ASP.NET 自动关闭之前允许执行的最大秒数。默认值为 110 秒。仅当元素中的 debug 属性设置为 false 时,此超时才适用。
<configuration>
<system.web>
<compilation debug="false" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" executionTimeout="60"/>
</system.web>
</configuration>
【讨论】:
你应该在你的 Web.config 里面试试这个...
1) <system.web>
<httpRuntime targetFramework="4.5.2" maxRequestLength="4194304" maxQueryStringLength="2048" executionTimeout="360" />
2)<basicHttpBinding>
<binding name="uploadFilesBasicHttpBinding" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" receiveTimeout="00:10:10" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00">
【讨论】: