Remoting
snyl 2007-07-03 10:57:21 在客户端调用远程方法时出错:调用的目标发生了异常
代码是这样的
服务端
ChannelServices.RegisterChannel(new TcpChannel(8088),false);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(Hosts), "hi", WellKnownObjectMode.Singleton);
客户端:
Hosts w = (Hosts)Activator.GetObject(typeof(Hosts), "tcp://localhost:8088/hi");
Response.Write(w.wr());////执行到这句出错
不知道为什么,以上代码有时执行成功,有时就出错.
弄了好久也没找到哪里写错了
之前一直这么写用着都没有出现过错误.
请有Remoting经验的人帮帮忙,谢谢了