We help IT Professionals succeed at work.

event IPC remoting proxy channel sink

twinfrey asked
Last Modified: 2013-12-17
When my event fires, the following exception occurs:
This remoting proxy has no channel sink which means either the server has no registered server channels that are listening, or this application has no suitable client channel to talk to the server.

const string mediatorUrl = "ipc://MediatorChannel/MediatorManager";
IDictionary prop = new Hashtable();
prop["portName"] = "MediatorChannel";
prop["authorizedGroup"] = "Everyone";

BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider(prop, null);
_channel = new IpcClientChannel(prop, clientProvider);

ChannelServices.RegisterChannel(_channel, false);
_serviceManager = (MediatorManager)Activator.GetObject(typeof(MediatorManager), mediatorUrl);

_serviceManager.OrderProcessingStarted += new EventHandler(ProcessingStarted);
_serviceManager.OrderProcessingCompleted += new EventHandler(ProcessingCompleted);

IDictionary prop = new Hashtable();
prop["portName"] = "MediatorChannel";
prop["authorizedGroup"] = "Everyone";

BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider(prop, null);
serverProvider.TypeFilterLevel = TypeFilterLevel.Full;

_channel = new IpcServerChannel(prop, serverProvider);
 ChannelServices.RegisterChannel(_channel, false);

Watch Question

Are you sure your server is exposing "ipc://MediatorChannel/MediatorManager" ?? If you are using remoting shouldnt the address just be a HTTP or a TCP address? Just thinking out loud


my understanding is no.  ipc does not use http or tcp remoting.  it uses windows messaging.

so, my original problem is actually a few problems. 1)  using a client and server icp channel is not good enough if you want events, as the server needs to know about the client.  so, it is better to use ipc channel and configure client and server formatters when registering channel.  Or add it to config.  2)  the events need to be wrapped in a class that fires the events to the proxy.  I found this solution very helpful:  http://sayala.com/code/RemotingEvents.zip  3)  Now, here is my current problem.  My remote object actually references a singleton on the server.  But, it appears that the proxy is creating its own singleton and thus the data is not updated correctly.  Aside from that, my events and callbacks are successful.
Unlock this solution and get a sample of our free trial.
(No credit card required)


The solution was complicated.  I did a few things.  I added a subscriber pattern with an event sync as shown in the previous link.  I also made an abstract class that did not marshall with all static properties for the server to interact.  The marshalled object subscribed to the static events in the abstract server object and my event syn subscribed to the remote object.  It all works, and now that I understand it better, it all makes sense.  Explaining it here is another thing entirely.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.