分布式开发的问题
ChannelServices.RegisterChannel(new TcpClientChannel());
Hello obj=(Hello)Activator.GetObject(typeof
(Hello),"tcp://127.0.0.1:8086/hi");
for(int i=0;i<5;i++)
{
Console.WriteLine(obj.getint(3));
}
客户端代码。。客户端程序无法运行。错误在Hello和Obj上
TcpServerChannel chan=new TcpServerChannel(8086);
ChannelServices.RegisterChannel(chan);
RemotingConfiguration.RegisterWellKnownServiceType(typeof
(Hello),"hi",WellKnownObjectMode.SingleCall);
System.Console.WriteLine("press return to exit");
System.Console.ReadLine();
服务器代码。
类文件已经写了。
究竟是怎么回事??????是不是哪里少写了一句代码??????