先注册一个通道,Tcp or Http 随便你
TcpChannel channel = new TcpChannel(8080);
ChannelServices.RegisterChannel(channel);
然后注册远程对象,SingleTon模式 or SingleCall模式 or 客户端激活模式 也随便你
各个模式的不同自己去MSDN看
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(ServerObject),
"ServiceMessage",WellKnownObjectMode.SingleTon);