Install SendTimeout in my WCF app.config

A bit 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 can I add a binding tag to set the SendTimeout value for more than 1 minute?

+4
source share
1 answer

You created the binding section in your server's .config file, for example IceLava, in the previous question:

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

In the above example, you can put it under your behavior.

Then, in the endpoint configuration, you add a reference to this binding with the binding of the property Configuration = "longTimeoutBinding".

Something like that:

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

If you have the WCF Services program from Juval Lowy, you can see more on pages 28-29 (2nd edition).

+21
source

All Articles