0

I would like to increase my connection timeout . I am hosting my WCF service in windows service. this is my App.config file:

`

<services>
  <service name="Service.WebexClient"  behaviorConfiguration="MyServiceTypeBehaviors" >
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8413/MyWebexService"/>
      </baseAddresses>
    </host>
  </service>

</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="MyServiceTypeBehaviors" >
      <serviceMetadata httpGetEnabled="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

` I would like to increase the time out, where do it put this configuration in the app.config file?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
MoShe
  • 6,197
  • 17
  • 51
  • 77
  • 1
    It sounds like you want to implement this on the server side (if I'm reading it wrong please correct me). How would a client application be able to know the connection timeout set on the server if they aren't able to connect in the first place? – M.Babcock Feb 05 '12 at 02:05
  • I can only find a reference to a transaction timeout not a connection timeout in Programming WCF Services. – Mark Hall Feb 05 '12 at 02:13
  • also http://stackoverflow.com/questions/229760/timeouts-wcf-services – Igby Largeman Feb 05 '12 at 04:51

1 Answers1

3

You should use a custom binding, for example in wsHttpBinding:

<bindings>
  <wsHttpBinding>
    <binding name="wsHttpBindingConfig"
         closeTimeout="00:00:30">
    </binding>
  </wsHttpBinding>
</bindings>

Than use it in the endpoint

<endpoint binding="wsHttpBinding"
          bindingConfiguration="wsHttpBindingConfig"
          contract="..."
          name="...">
</endpoint>
Gal Segal
  • 46
  • 1