Due to external constraints, I have to provide remoting access to the same Singleton object through two URI's. Omitting all the remoting configuration (which does seem to set up correctly), the general idea is:
m_RemotedComponent = new RemotedComponent();
The two connections provide different interfaces that the one component supports and are accessed by different clients.
Regardless of the order in which the two Marshal statements appear, the first one works and the second one doesn't. Upon attempting to connect to the second URI (regardless of whether I have an active connection to the first URI) using
Activator.GetObject(...), I get the error message saying that the object has to derive from
MarshalByRefObject. But, since I can always instantiate the first-listed URI successfully, it obviously does derive from that. If I create a second
RemotedComponent, I can marshal it successfully to the second URI, so the problem is clearly related to trying to marshal the same object to two URI's.
Is this supposed to be possible? If so, how?
View Complete Post