public static void RegeistChanel() { TcpChannel channel = new TcpChannel(BimtApp.GetPORT()); ChannelServices.RegisterChannel(channel, false); RemotingConfiguration.RegisterWellKnownServiceType(typeof(BimtApp), BimtApp.GetNAME(), WellKnownObjectMode.SingleCall); }
public static void ShutDown() { TcpChannel channel = new TcpChannel(); ChannelServices.RegisterChannel(channel, false); IBimtApp obj = (IBimtApp)Activator.GetObject(typeof(RemotingObjects.IBimtApp), BimtApp.GetURL()); if (obj == null) { throw new Exception("Couldn't crate Remoting Object 'BimtApp'."); } try { obj.ShutDown(); } catch (System.Net.Sockets.SocketException e) { throw e; } }