Re: Calling delegate on client raises a RemotingException
From: Ken Kolda (ken.kolda_at_elliemae-nospamplease.com)
Date: 11/11/04
- Next message: mtv: "Re: Maintaining CAO in Web Service"
- Previous message: Pun Law: "How to increase receive buffer in http channel?"
- In reply to: mdb: "Re: Calling delegate on client raises a RemotingException"
- Next in thread: Jeremy Chapman: "Re: Calling delegate on client raises a RemotingException"
- Reply: Jeremy Chapman: "Re: Calling delegate on client raises a RemotingException"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 11 Nov 2004 08:14:12 -0800
Actually, using port "0" on the client is exactly what you want to do. Most
likely, you haven't registered a channel at all. As a result, when you
invoked your remote object, the framework created on for you. But it created
a client channel only. If your client is going to be accepting callbacks,
then it needs a server channel as well. If you create a channel as follows:
ChannelServices.RegisterChannel(new TcpChannel(0));
it will tell the framework to create both a client and server channel (the
framework will choose the server channel port itself). If you specify a port
number, e.g.
ChannelServices.RegisterChannel(new TcpChannel(1955));
then the problem is that you won't be able to run two clients concurrently
on the same machine. Using port "0" avoids this problem as the framework
will automatically avoid prot collisions.
Ken
"mdb" <m_b_r_a_y@c_t_i_u_s_a__d0t__com> wrote in message
news:Xns959E65C5E7EB3mbrayctiusacom@207.46.248.16...
> "Jeremy Chapman" <NoSpam@Please.com> wrote in
> news:#iU6LK3xEHA.3976@TK2MSFTNGP09.phx.gbl:
>
> > I set a delegate on my remotable object but when the server side tries
> > to call the delegate method, I get the exception:
> >
> > System.Runtime.Remoting.RemotingException: 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'm new to remoting, but I'll take a stab... On your client application,
> what port number are you using when you register the TcpChannel? If its
> '0' (ie any available port) that might be the problem. The '0' port is
> good enough for getting results of calls that you make to the server, but
> its not good enough for receiving messages initiated by the server.
> Register with an actual port number.
>
> -mdb
- Next message: mtv: "Re: Maintaining CAO in Web Service"
- Previous message: Pun Law: "How to increase receive buffer in http channel?"
- In reply to: mdb: "Re: Calling delegate on client raises a RemotingException"
- Next in thread: Jeremy Chapman: "Re: Calling delegate on client raises a RemotingException"
- Reply: Jeremy Chapman: "Re: Calling delegate on client raises a RemotingException"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|