title: WCF in Silverlight - how to set change the default timeout of 1 minute
body: <p>I have a WCF  service I am connecting to in in a Silverlight project. The task the service needs to do takes over a minute (which is fine), but I get an error. I communicate to it via a proxy (created by dev studio when you add a service reference)</p>
  
  <blockquote>
    <p><code>The HTTP request to 'http://localhost/ImporterService.svc' has exceeded the allotted  timeout. The time allotted to this operation may have been a portion of a longer timeout.</code></p>
  </blockquote>
  
  <p>(where ImporterService is my service)</p>
  
  <p>I Have read all sort of posts for the last 3 days about increasing the following. </p>
  
  <pre><code>receiveTimeout="00:10:00"
  sendTimeout="00:10:00"
  openTimeout="00:10:00"
  closeTimeout="00:10:00"
  </code></pre>
  
  <p>Nothing has worked, it still times out after 1 minute!</p>
  
  <p>Ok, so in the file ServiceReferences.ClientConfig generated I have added the values in the following place</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;system.serviceModel&gt;
    &lt;bindings&gt;
     &lt;basicHttpBinding&gt;
     &lt;binding name="BasicHttpBinding_ImporterService" maxBufferSize="2147483647"
        receiveTimeout="00:10:00"
        sendTimeout="00:10:00"
          openTimeout="00:10:00"
          closeTimeout="00:10:00"
          maxReceivedMessageSize="2147483647"&gt;
          &lt;security mode="None" /&gt;
          &lt;/binding&gt;
          ....
  </code></pre>
  
  <p>This timeout appear to be occurring on the client side (eg I can make it happen by adding a 1 minutes sleep in the service code)</p>
  
  <p>Question1
  So, in my case is it only the client side I need to change.</p>
  
  <p>At any rate in the web.config
  In the web.config, I added the block         
  
  <pre><code>inside the existing &lt;basicHttpBinding&gt; as shown below
  
  
   &gt;&lt;basicHttpBinding&gt;
      &gt;&lt;binding name="downloadBinding" maxReceivedMessageSize="2000000" maxBufferSize="2000000"&gt;
      &gt;&lt;readerQuotas maxArrayLength="2000000" maxStringContentLength="2000000" /&gt;
      &gt;&lt;/binding&gt;
      &gt;    
      &gt;&lt;binding name="BasicHttpBinding_IImporterService" maxBufferSize="2147483647"
      &gt;receiveTimeout="00:10:00"
      &gt;sendTimeout="00:10:00"
      &gt;openTimeout="00:10:00"
      &gt;closeTimeout="00:10:00"
      &gt;maxReceivedMessageSize="2147483647"&gt;
      &gt;&lt;security mode="None" /&gt;
      &gt;&lt;/binding&gt;
      &gt;    
      &gt;&lt;/basicHttpBinding&gt;            
      &gt;&lt;/bindings&gt;
  </code></pre>
  
  <p>Note I am using the names BasicHttpBinding_IImporterService (other posts have used random names where they are not even the same on the client and server! e.g.</p>
  
  <pre><code>I also have &lt;httpRuntime executionTimeout set to a huge value.
  </code></pre>
  
  <p>The time out just does not increase. It is still 1 minute.</p>
  
  <p>So, big questions</p>
  
  <pre><code>1. What an I doing wrong, am I putting these settings in the wrong place?
  2. Is it just client side I need to do
  3. Perhap it can be done in code if these config settings don't work
  </code></pre>
  
  <p>Eg where I use it, I instantiated using</p>
  
  <blockquote>
    <p><code>ImporterServiceClient importerService = new ImporterServiceClient("*", new &gt;EndpointAddress(ServicePath));</code></p>
  </blockquote>
  
  <p>I know there are lots other other post, but, but most just include the properties, and not exactly where to set them, so obviously mine are in the wrong place?</p>
  
  <p>Any help would be greatly appreciated. All I want to do is increase a time out (in code, config, anywhere that will actually work)!</p>
  
  <p>Thanks in advance to any one that can help here
  Pete</p>