1.用TCP通道:
Server.cs
...
  TchChannel tcpchan=new TcpChannel(8800);
  ChannelServices.RegisterChannel(tcpchan);
  RemotingConfiguration.RegisterWellKnownServiceType(
             typeof(RemotObject),"RemotObject",WellKnownObjectMode.Singleton);
...
Client.cs
...
  TcpClientChannel Tcpchan = new TcpClientChannel();
  ChannelServices.RegisterChannel(tcpchan);
  Remotingurl="tcp://localhost:8800/RemotObject";
 
  object ob = Activator.GetObject(typeof(RemotObject),Remotingurl);
...
以上能够正确执行。2.用Http通道
Server.cs
...
  HttpChannel httpchan=new HttpChannel(8800);
  ChannelServices.RegisterChannel(httpchan);
  RemotingConfiguration.RegisterWellKnownServiceType(
             typeof(RemotObject),"RemotObject",WellKnownObjectMode.Singleton);
...
Client.cs
...
  HttpClientChannel httpchan = new httpClientChannel();
  ChannelServices.RegisterChannel(httpchan);
  Remotingurl="http://localhost:8800/RemotObject";
 
  object ob = Activator.GetObject(typeof(RemotObject),Remotingurl);
...执行结果为什么提示:“指定的SOAPAction无效”