简体   繁体   中英

Increasing timeout WCF calling ASMX

I have a WCF service which consumes an asmx web service. Calls to the web service sometimes timeout. How do I increase the timeout value, ideally in the webconfig.

Thanks

You should be able to adjust the execution timeout within your web.config.

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. The default is 110 seconds. This time-out applies only if the debug attribute in the element is set to 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...

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">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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