remoting
2004-12-06 14:34
288 查看
Here are the steps to build the server:
Add a reference to the System.Runtime.Remoting.dll assembly.
Implement a class that derives from MarshalByRefObject.
Choose one of the provided channel implementations (TCP or HTTP), and register it using the ChannelServices.RegisterChannel method.
Register the class as a well-known object using the RemotingConfiguration.RegisterWellKnownServiceType method. Keep the server alive waiting for client requests the steps for creating the client are as follows:
Add a reference to the System.Remoting.Runtime.Remoting.dll.
Add a reference to the assembly containing the metadata for the remote type, in this case MathLibrary.dll.
Register a channel object using the same channel type as the server.
Call the Activator.GetObject method, passing the appropriate URL, to retrieve a proxy to the remote object.
Cast the proxy to the correct type and start using it as if it were the actual object.
Add a reference to the System.Runtime.Remoting.dll assembly.
Implement a class that derives from MarshalByRefObject.
Choose one of the provided channel implementations (TCP or HTTP), and register it using the ChannelServices.RegisterChannel method.
Register the class as a well-known object using the RemotingConfiguration.RegisterWellKnownServiceType method. Keep the server alive waiting for client requests the steps for creating the client are as follows:
Add a reference to the System.Remoting.Runtime.Remoting.dll.
Add a reference to the assembly containing the metadata for the remote type, in this case MathLibrary.dll.
Register a channel object using the same channel type as the server.
Call the Activator.GetObject method, passing the appropriate URL, to retrieve a proxy to the remote object.
Cast the proxy to the correct type and start using it as if it were the actual object.
相关文章推荐
- Webwork对checkbox复选框Action的处理
- C语言初学者易踩十八颗“地雷”
- 随想:自己有眼不识泰山,现在发现了那是一个别有洞天的世界
- 我读《企业应用架构模式》
- 从手机网络游戏《神役》谈SP下一个热点
- 删除不为空目录的两种实现方式
- 无题:领导程序员
- 二十四孝
- Macromedia Flash &Database 集成概述
- 用Java开发代理服务器
- 想在客户端脚本中引用CHECKBOXLIST中的CHECKBOX项?
- WSRP——远程门户网站Web服务
- 四所学校情报学研究生课程设置列表
- JAVA上加密算法的实现用例MD5/SHA1,DSA,DESede/DES,Diffie-Hellman的使用
- 程序员:脚下的路在何方?一个奋斗者的感受!(转载。。。)
- C#中的委托
- Tomcat使用中的问题
- Tomcat使用中的问题
- 发现CSS控件的好处
- SQL触发器中使用子查询的教训