/* Example18_9.cs uses an object via remoting */ using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Http; class Example18_3 { public static void Main() { // create and register an HttpChannel HttpChannel hchan = new HttpChannel(0); ChannelServices.RegisterChannel(hchan); // Get an object from the other end of the channel Object remoteObject = RemotingServices.Connect(typeof(ISimpleObject), "http://localhost:54321/SOEndPoint"); // Cast it back to the shared interface ISimpleObject so = remoteObject as ISimpleObject; // and use the object Console.WriteLine(so.ToUpper("make this uppercase")); } }