locked
WCF throwing timeout exceptions RRS feed

  • Question

  • Hello--

    I'm getting timeout errors & my web.config settings apparently aren't working--

    I have a WCF service that downloads data, called DownloadDataService.

    Here's the service definition:
    <service behaviorConfiguration="DownloadDataServiceBehavior" name="DownloadDataService">
    <endpoint address="" binding="basicHttpBinding" contract="IDownloadDataService"
    bindingConfiguration="Binding1">
    <identity>
    <dns value="localhost" />
    </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    </service>



    And the basicHttpBinding settings:


    <bindings>
    <basicHttpBinding>
    <binding name="Binding1"
    hostNameComparisonMode="StrongWildcard"
    receiveTimeout="20:00:00"
    sendTimeout="20:00:00"
    openTimeout="20:00:00"
    closeTimeout="20:00:00"
    maxReceivedMessageSize="65536"
    maxBufferSize="65536"
    maxBufferPoolSize="524288"
    transferMode="Buffered"
    messageEncoding="Text"
    textEncoding="utf-8"
    bypassProxyOnLocal="false"
    useDefaultWebProxy="true" >
    <security mode="None"/>
    </binding>
    </basicHttpBinding>
    </bindings>



    I'm using all the default values listed on MSDN's website except the timeouts - which I'd like to be 20 hours for everything.

    But I'm still getting timeout exceptions coming back.


    Does anyone know what I'm doing wrong?



    Thanks Alan
    Sunday, September 6, 2009 12:26 PM

Answers

  • Problem solved--

    It wasn't with the server, the problem was client-side. The download service client on the SL app has a default timeout of 1 minute.

    Change it with:
    DownloadClient.InnerChannel.OperationTimeout = new TimeSpan(0, 20, 0, 0, 0);

    Hope this reminder saves someone else some agony...


    Sorry for duplicate posts--didn't realize I sent the other through
    Alan
    Sunday, September 6, 2009 12:42 PM