protected WcfStreamWrapper() { NetNamedPipeBinding binding; try { binding = new NetNamedPipeContextBinding("InProcFactory"); } catch { binding = new NetNamedPipeContextBinding(); } binding.TransferMode = TransferMode.Streamed; binding.MaxReceivedMessageSize = 524288; InProcFactory.SetBinding(binding); Proxy = InProcFactory.CreateInstance <S, I>(binding); }