Need help with Remoting question

J

Jayme Pechan

I have an object in a service that, of course, is derived from
MarshalByRefObj and is setup as a wellknown type in my app.config file. I
can get a reference to this object just fine and call functions. One of my
functions needs to return another object that also derives from
MarshalByRefObj.

When I do this real simply, the client gets an error when trying to call a
function on the returned object:

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.

I think this means that I need to have something in my app.config file for
the new object. I tried putting a wellknown type in there for this object
but since the client doesn't instantiate the object, I'm not getting the
reference via the standard Activator.GetObject and it doesn't work.

Doesn't anyone know what I need to do to return a MarshalByRefObj derived
object from a remoted object like this? Any help would be appreciated.
Thanks.
 
D

Dave Sexton

Hi Jayme,

The framework error indicates that you are either missing a suitable client channel from where you are invoking the method or that
you are missing a suitable server channel that will receive the invocation.

In both the client and server apps you have to register both client and server channels. If you're using TCP then you should
register TcpChannels, which handles both sending and receiving on the client and server.

You also need to make sure that the client and server channels are either both secure, or both not secure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top