接触Remoting的时间不长,很多还需加强理解,请问楼上当时是怎么解决的。
下面是客户端和服务器端注册通道和调用远程对象的代码,请高手帮忙看看...
 private void ClientForm_Load(object sender, EventArgs e)
 {
     HttpChannel channel = new HttpChannel(0);
     ChannelServices.RegisterChannel(channel);     faxBusiness = (IFaxBusiness)Activator.GetObject(typeof(IFaxBusiness), "http://localhost:8080/FaxBusiness.soap");
 }private void ServerForm_Load(object sender, EventArgs e)
{
     HttpChannel channel = new HttpChannel(8080);
     ChannelServices.RegisterChannel(channel);
     //注册远程对象FaxBusiness
     RemotingConfiguration.RegisterWellKnownServiceType(typeof(FaxBusiness), "FaxBusiness.soap", WellKnownObjectMode.Singleton);
     FaxBusiness.FaxSendedEvent += new FaxEventHandler(OnFaxSended);
}