Question Client to WCF throwing The request was aborted at dead on 60 seconds

gchq

Well-known member
Joined
Dec 14, 2007
Messages
168
Programming Experience
10+
Running an async job to WCF it blows out at dead on 60 seconds with

System.Net.WebException: The request was aborted: The request was canceled.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)


I have tried changing keepalive and in both IIS7 and web.config and setting closeTimeout, but still the same thing!!! Any ideas?

Of course, it HAD to do it on function that has to run on the last day of the year and the clock is ticking...

Thanks

Thanks
 
Solved

As well as changing some of the defaults in web.config at the server end:-

VB.NET:
<bindings>
      
      <basicHttpBinding>
        <binding maxReceivedMessageSize="1165536" maxBufferSize="1165536" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="00:10:00">
          <security mode="Transport" />
          <readerQuotas maxArrayLength="1165536" maxStringContentLength="1165536"/>
        </binding>             
      </basicHttpBinding>
      
      <customBinding>        
        <binding name="CustBinding" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="00:10:00">
                  <security authenticationMode="UserNameOverTransport">
          </security>
          <binaryMessageEncoding>
          </binaryMessageEncoding>
          <httpsTransport keepAliveEnabled="false"/>
        </binding>
      </customBinding>
      
    </bindings>

I forgot to change the settings in app.config at the client end

VB.NET:
<bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IService1" closeTimeout="00:10:00"
                    openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="1165536" maxBufferPoolSize="524288" maxReceivedMessageSize="1165536"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="1165536" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <security mode="Transport">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
            </basicHttpBinding>
        </bindings>


It was openTimeout that was causing the problem. The bland error didn't help, but the exact 60 seconds gave something away in the timeout arena....
 
Back
Top