views:

4151

answers:

1

Hi,

Little confused looking at my app.config, it looks like this:

<system.serviceModel>

<servcies>

    <service>

     <endpoint address="" binding="basicHttpBinding">
      <identity>
                           <dns value="localhost"
      </identity>
     <endpoint>

    </service>



</services>
<behaviors>
    <serviceBehaviors>

     <behavior>
      ...
     </behavior>

    </serviceBehaviors>
</beharviors>

</system.serviceModel>

Where exactly would I add my binding tag to set the SendTimeout value to larger than 1 minute?

+2  A: 

You set up a bindings section in your server's .config file like IceLava showed in your previous question:

  <bindings>
    <netTcpBinding>
    <binding name="longTimeoutBinding"
        receiveTimeout="00:10:00" sendTimeout="00:10:00">
      <security mode="None"/>
    </binding>
    </netTcpBinding>
   </bindings>

In your example above you could put it right under your behaviors.

Then, in your endpoint configuration you add a reference to that binding with the property bindingConfiguration = "longTimeoutBinding".

Something like this:

<endpoint address="" bindingConfiguration="longTimeoutBinding" binding="basicHttpBinding">
        <identity>
                   <dns value="localhost" />
        </identity>
<endpoint>

If you have the Programming WCF Services by Juval Lowy book you can see more on pages 28-29 (2nd Edition).

Terry Donaghe