Пример #1
0
    public static void Main()
    {
        ChannelServices.RegisterChannel(new HttpChannel(8090));

        RemotingConfiguration.RegisterWellKnownServiceType(typeof(RemoteObject),
                                                           "RemoteObject",
                                                           WellKnownObjectMode.Singleton);

        RemoteObject RObj =
            (RemoteObject)Activator.GetObject(typeof(RemoteObject),
                                              "http://localhost:8090/RemoteObject");

        LocalObject LObj = new LocalObject();

        RObj.Method1(LObj);

        Console.WriteLine("Press Return to exit...");

        Console.ReadLine();
    }