For study purpose, I am trying to imitate a WCF pipe service host.
I have the following trivial Service definition
[ServiceContract]
public interface IPipeService
{
[OperationContract]
void PipeIn(string data);
}
And a client console app which consumes it via net pipes (DotNet 8 SDK)
string URI = "net.pipe://localhost/Pipe";
var cf = new ChannelFactory<IPipeService>(
new NetNamedPipeBinding(NetNamedPipeSecurityMode.None),
new EndpointAddress(URI));
cf.Open();
IPipeService proxy = cf.CreateChannel();
proxy.PipeIn("Hello");
I am trying to tap the raw message, so I have a server-side process that is running this trivial 2 line code:
var pipeIn = new NamedPipeServerStream("net.pipe://localhost/Pipe", PipeDirection.In, 1, PipeTransmissionMode.Byte, PipeOptions.None);
pipeIn.WaitForConnectionAsync(token);
The problem is that pipeIn.WaitForConnectionAsync() waits forever, and on the client side, I am getting this error thrown immediately when proxy.PipeIn() is called:
There was no endpoint listening at net.pipe://localhost/Pipe that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
I tried to debug the client code, dug into the WCF guts, but to no avail. I couldn’t find the code which is doing the actual “weight lifting”, and I suspect that since the client proxy is auto generated, the VS22 debugger is unable to properly debug it.
What am I missing?
What am I missing?