[Last Call] Learn how to a build a cloud-first strategyRegister Now


event IPC remoting proxy channel sink

Posted on 2007-10-08
Medium Priority
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);

Question by:twinfrey
  • 2
  • 2
LVL 21

Expert Comment

ID: 20042274
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

Author Comment

ID: 20042507
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.
LVL 21

Accepted Solution

surajguptha earned 1500 total points
ID: 20042719
Singletom just means that there will be just one instance of the server handling multiple requests unlike single call. why do you think the proxy creates a singleton. Did you means that for every proxy call a new singleton gets created at the server?

Author Comment

ID: 20060060
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.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question