Search code examples
wcfasp.net-mvc-3c#-4.0wcf-binding

Timeout configuration in WCF


It is really weird that for this configuration, the service actually timed out in just one minute. Isn't "01:00:00" one hour? Or for different timeout property, it uses different format? Is there a documentation for this? Thanks!

<binding name="BasicHttpBindingBigMessages" 
         closeTimeout="00:59:00" 
         openTimeout="00:59:00" 
         receiveTimeout="00:59:00" 
         sendTimeout="00:59:00" 
         allowCookies="false" 
         bypassProxyOnLocal="false" 
         hostNameComparisonMode="StrongWildcard" 
         maxBufferSize="1000000000" 
         maxBufferPoolSize="100000000" 
         maxReceivedMessageSize="1000000000" 
         messageEncoding="Text" 
         textEncoding="utf-8" 
         transferMode="Buffered" 
         useDefaultWebProxy="true">

  <readerQuotas maxDepth="32" 
                maxStringContentLength="819200" 
                maxArrayLength="1638400" 
                maxBytesPerRead="4096" 
                maxNameTableCharCount="16384" />

This is the error message I saw in my code in debug mode:

{"The request channel timed out while waiting for a reply after 01:00:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout."}


Solution

  • Do you have control over the client and server configuration? It could be a timeout on the server (via HttpRuntime setting).

    <system.web>
        <!-- Maximum 10 min timeout -->
        <httpRuntime executionTimeout="600" />
    </system.web>