[英]Setting SendTimeout in my WCF app.config
Little confused looking at my app.config, it looks like this: 看着我的app.config有点困惑,它看起来像这样:
<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? 我究竟会在哪里添加我的绑定标记以将SendTimeout值设置为大于1分钟?
You set up a bindings section in your server's .config file like IceLava showed in your previous question: 您在服务器的.config文件中设置了一个绑定部分,如上一个问题中显示的IceLava:
<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". 然后,在端点配置中,使用属性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). 如果您有Juval Lowy的编程WCF服务,请参阅第28-29页(第2版)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.