有什么方法可以将 netnamedpipe 绑定与 duplex 一起使用?我收到以下错误。
合同需要双工,但绑定“NetNamedPipeBinding”不支持它或未正确配置以支持它。
ServiceHost host = new ServiceHost(typeof(MyService));
NetNamedPipeBinding npb = new NetNamedPipeBinding();
npb.MaxBufferSize = Int32.MaxValue;
npb.MaxReceivedMessageSize = Int32.MaxValue;
npb.OpenTimeout = new TimeSpan(200000);
npb.CloseTimeout = new TimeSpan(200000);
npb.SendTimeout = new TimeSpan(200000);
npb.TransferMode = TransferMode.Streamed;
host.AddServiceEndpoint(typeof(IMyService), npb, "net.pipe://localhost/MyService");
host.Open(); // I am getting above error here
请指导我。