问题标签 [webchannelfactory]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
312 浏览

c# - WCF Binding 类实例的重用

在应用程序启动后,我在应用程序客户端的代码中创建 NetTcpBinding-s,然后使用它通过创建通道工厂

构造函数。

在某些 List[NetTcpBinding] 集合中预缓存这些 NetTcpBinding 实例然后使用该集合的元素多次创建 ChannelFactory 是否正确?WCF 是否每次都会自动重置绑定超时等?

为每个客户端调用创建新的绑定实例是完全安全还是更安全?

0 投票
0 回答
116 浏览

keep-alive - .net c#WebChannelFactory keepAliveEnabled=false 与 webHttpBehavior

我创建了 WebChannelFactory。我需要设置 KeepAlive=false。我发现只有一种解决方案使用 CustomBinding。并将属性 keepAliveEnabled 设置为 false。

我也为我的工厂使用自定义行为。

代码:



在当前情况下,我收到错误“没有与 None MessageVersion 的绑定”。