接触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);
}
下面是客户端和服务器端注册通道和调用远程对象的代码,请高手帮忙看看...
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);
}
是基于CS的,我不知道你指的权限和远程调用是怎么开启。我在网上找到相关的是IIS的匿名用户访问权限问题,我看了一下“IUSR_用户名”是正常的,
但是我觉的CS架构的不需要用到IIS。现在不知道Remoting需要那些权限,出现这种问题是什么原因?