简体   繁体   English

超时WCF调用ASMX的超时

[英]Increasing timeout WCF calling ASMX

I have a WCF service which consumes an asmx web service. 我有一个使用asmx Web服务的WCF服务。 Calls to the web service sometimes timeout. 调用Web服务有时会超时。 How do I increase the timeout value, ideally in the webconfig. 如何增加超时值,最好是在webconfig中。

Thanks 谢谢

You should be able to adjust the execution timeout within your web.config. 您应该能够在web.config中调整执行超时。

HttpRuntimeSection.ExecutionTimeout HttpRuntimeSection.ExecutionTimeout

The ExecutionTimeout property indicates the maximum number of seconds a request is allowed to execute before being automatically shut down by ASP.NET. ExecutionTimeout属性指示在ASP.NET自动关闭请求之前,允许执行请求的最大秒数。 The default is 110 seconds. 默认值为110秒。 This time-out applies only if the debug attribute in the element is set to false. 仅当元素中的debug属性设置为false时,此超时才适用。

<configuration>
    <system.web>
      <compilation debug="false" targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" executionTimeout="60"/>
    </system.web>
</configuration>

You should try this in your Web.config inside... 您应该在Web.config里面尝试这个...

1) <system.web> 1) <system.web>

<httpRuntime targetFramework="4.5.2" maxRequestLength="4194304" maxQueryStringLength="2048" executionTimeout="360" />

2) <basicHttpBinding> 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">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM