[Mono-list] Remoting
Sam Clegg
sam@superduper.net
Mon, 4 Aug 2003 18:56:44 +0100
--ytoMbUMiTKPMT3hY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Aug 04, 2003 at 04:00:01PM +0200, Wilhelm Patrick wrote:
> switch (appMode)=20
> {
> default:
> case AppMode.Server:
> // Register a new channel with the runtime remoting services
> ChannelServices.RegisterChannel(new TcpChannel(13100));
>=20
> // Register a type as a well-known type
> RemotingConfiguration.RegisterWellKnownServiceType(
> typeof(RemoteCtrl),
> "remotectrl",
> WellKnownObjectMode.Singleton
> );
> //...
>=20
> break;
> case AppMode.Client:
> RemotingConfiguration.RegisterWellKnownServiceType(
> typeof(RemoteCtrl),
> "remotectrl",
> WellKnownObjectMode.Singleton
> );
>=20
> RemoteCtrl remoteCtrl =3D=20
> (RemoteCtrl)RemotingServices.Connect(
> typeof(RemoteCtrl),
> "tcp://localhost:13100/remotectrl"
> );
> remoteCtrl.GetPatternGeneratorCtrl(out patGenCtrl);
> //...
>=20
> break;
> }
You need to RegisterChannel on the client side as well, like the=20
error says. You can do this withou specifing a port:
ChannelServices.RegisterChannel(new TcpChannel());
You also probably don't want to RegisterWellKnownServiceType on
the client side.
Strange if works under windows though.
--=20
sam clegg
:: sam@superduper.net :: http://superduper.net/ :: PGP : D91EE369=20
$superduper: .signature,v 1.13 2003/06/17 10:29:24 sam Exp $
--ytoMbUMiTKPMT3hY
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/Lp5cLOvxONke42kRAueCAJ4nk22wuFdOe2sVYdALXW1rRGsJigCgpAIF
iP64ry8nmeHLMtc7wMNn6ow=
=s1BF
-----END PGP SIGNATURE-----
--ytoMbUMiTKPMT3hY--