title: How to increase the SendTimout value on the binding?
body: <p>When I perform a command on the client, it waits for a response. I know this command will take a long time but the default timeout seems to be about 1 minute. Every time I invoke the command from the client I get this error:</p>
  
  <pre><code>System.TimeoutException was unhandled
    HResult=-2146233083
    Message=The request channel timed out while waiting for a reply after 00:00:59.9809981. 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.
    Source=mscorlib
    StackTrace:
      Server stack trace: 
         at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
         at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
         at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
         at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
         at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
      Exception rethrown at [0]: 
         at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
         at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)
         at Client.CommandServices.CommandService.Execute(Object command)
         at Client.CommandServices.CommandServiceClient.Execute(Object command) in c:\TFS\Solid\Client\Service References\CommandServices\Reference.cs:line 58
         at Client.Code.WcfServiceCommandHandlerProxy`1.Handle(TCommand command) in c:\TFS\Solid\Client\Code\WcfServiceCommandHandlerProxy.cs:line 13
         at Client.Controllers.CommandExampleController.ExecuteGenericCommand() in c:\TFS\Solid\Client\Controllers\CommandExampleController.cs:line 62
         at Client.Program.Main(String[] args) in c:\TFS\Solid\Client\Program.cs:line 25
    InnerException: System.TimeoutException
         HResult=-2146233083
         Message=The HTTP request to 'http://localhost:9999/CommandService.svc' has exceeded the allotted timeout of 00:00:59.9870000. The time allotted to this operation may have been a portion of a longer timeout.
         Source=System.ServiceModel
         StackTrace:
              at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
              at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
              at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
         InnerException: System.Net.WebException
              HResult=-2146233079
              Message=The operation has timed out
              Source=System
              StackTrace:
                   at System.Net.HttpWebRequest.GetResponse()
                   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
              InnerException: 
  
  
  "The HTTP request to 'http://localhost:9999/CommandService.svc' has exceeded the allotted timeout of 00:00:59.9870000. The time allotted to this operation may have been a portion of a longer timeout."}
  
  The HTTP request to 'http://localhost:9999/CommandService.svc' has exceeded the allotted timeout of 00:00:59.9870000. The time allotted to this operation may have been a portion of a longer timeout.
  </code></pre>
  
  <p>Here is the app.config in the client.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
      &lt;startup&gt; 
          &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt;
      &lt;/startup&gt;
      &lt;system.serviceModel&gt;
          &lt;bindings&gt;
              &lt;basicHttpBinding&gt;
                  &lt;binding name="BasicHttpBinding_CommandService" /&gt;
                  &lt;binding name="BasicHttpBinding_QueryService" /&gt;
              &lt;/basicHttpBinding&gt;
          &lt;/bindings&gt;
          &lt;client&gt;
              &lt;endpoint address="http://localhost:9999/CommandService.svc"
                  binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_CommandService"
                  contract="CommandServices.CommandService" name="BasicHttpBinding_CommandService" /&gt;
              &lt;endpoint address="http://localhost:9999/QueryService.svc" binding="basicHttpBinding"
                  bindingConfiguration="BasicHttpBinding_QueryService" contract="QueryServices.QueryService"
                  name="BasicHttpBinding_QueryService"/&gt;
          &lt;/client&gt;
      &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>...and here is the web.config of the WCF service. </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  
    &lt;appSettings&gt;
      &lt;add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /&gt;
    &lt;/appSettings&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime targetFramework="4.5"/&gt;
    &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior&gt;
            &lt;!-- To avoid disclosing metadata information, set the values below to false before deployment --&gt;
            &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/&gt;
            &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information --&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;protocolMapping&gt;
          &lt;add binding="basicHttpsBinding" scheme="https" /&gt;
      &lt;/protocolMapping&gt;    
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
      &lt;!--
          To browse web app root directory during debugging, set the value below to true.
          Set to false before deployment to avoid disclosing web app folder information.
        --&gt;
      &lt;directoryBrowse enabled="true"/&gt;
    &lt;/system.webServer&gt;
    &lt;connectionStrings&gt;
      &lt;add name="MainframeEntities" connectionString="metadata=res://*/MainframeEntities.csdl|res://*/MainframeEntities.ssdl|res://*/MainframeEntities.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=IT-DEV;initial catalog=Mainframe;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt;
    &lt;/connectionStrings&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I'm not sure where to change the timing. Thanks.</p>