I am working on a prototype and I need implement inter-process communication between a WPF desktop application and the back-end of a locally hosted ASP.NET website. I was able to get IPC (using named pipes) working between 2 WPF desktop applications using WCF but am having difficulty making this work with the client being the back-end of website instead of a separate desktop application.
My website is hosted locally on my development machine using IIS. Here are some of the settings I have configured in my IIS manager or on my local machine.
- I have enabled the net.pipe protocol for my website.
- I have enabled Named Pipe Activation via Turn Windows feature on or off > .NET Framework 4.7 Advanced Services > WCF Services.
- I have added a Site Binding of type net.pipe with a wildcard * as it's Binding Information.
I run my server desktop application which creates a named pipe using WCF that can be connected to by clients. When I attempt to access my web page, an EndpointNotFoundException is thrown stating The message could not be dispatched because the service at the endpoint address 'net.pipe://localhost/CessProto' is unavailable for the protocol of the address.
The client code used to connect to the created endpoint (in both my the controller of my web page & my client desktop application) is shown below.
var callback = new CallbackService();
var context = new InstanceContext(callback);
var pipeFactory = new DuplexChannelFactory<IServerService>(context,
new NetNamedPipeBinding(),
new EndpointAddress("net.pipe://localhost/CessProto"));
_serverService = pipeFactory.CreateChannel();
_serverService.Connect();
I have a client desktop application with the same code and it can connect to the pipe without issue but when the client is the back end controller of a web page and I attempt to access the web page in my browser, an exception is thrown when the call is made to Connect().
Any idea what might be the issue here?
Thanks
Edit: Changed title & reworded some things.