Tag: duplex channel

双工通道故障事件在第二次连接尝试时不会上升

我有常规的net.tcp WCF服务客户端,以及常规的net.tcp 双工 (即带回调)WCF服务客户端。 我已经实现了一些逻辑,以便在服务出现故障的情况下不断重新实现连接。 它们以完全相同的方式创建: FooServiceClient Create() { var client = new FooServiceClient(ChannelBinding); client.Faulted += this.FaultedHandler; client.Ping(); // An empty service function to make sure connection is OK return client; } BarServiceClient Create() { var duplexClient = new BarServiceClient(new InstanceContext(this.barServiceCallback)); duplexClient.Faulted += this.FaultedHandler; duplexClient.Ping(); // An empty service function to make sure connection is […]