方法之一:ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpguide/html/cpconremotingexampledynamicpublication.htm

解决方案 »

  1.   

    brunhild提供的方法不太明白。有清楚点的实例吗最好是c#写的,谢谢各位大侠了
      

  2.   

    服务器:
    TcpServerChannel tcpsChannel = new TcpServerChannel(channel);
    ChannelServices.RegisterChannel(tcpsChannel);
    RemotingConfiguration.RegisterWellKnownServiceType( typeof(BusinessLogic.RemoteObject),"RemoteObject", WellKnownObjectMode.Singleton);
    RemotingConfiguration.ApplicationName = "DataServer";
    RemotingConfiguration.RegisterActivatedServiceType(typeof(BusinessLogic.RemoteObject));
    客户:对象 = (BusinessLogic.RemoteObject)Activator.GetObject(typeof(BusinessLogic.RemoteObject),"tcp://地址:8089/RemoteObject");
      

  3.   

    tcp可换成http,如果是通过internet访问的话,可以穿过防火墙
      

  4.   

    其实例子最重要的就一句:
    Dim ref1 As ObjRef = RemotingServices.Marshal(object1, "object1uri")
    它的作用就是将由HOST创建的object1封送为可以被其他远程CLIENT访问的对象,也就是实现了你所讲的HOST和CLIENT公用一个对象。能够帮你的就这么多,能不能理解就看你自己了。