All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
ASP.NET Remoting体系结构(三)

Writer: qq Article type: Programming skills(编程技巧) Time: 2014/7/9 1:35:39 Browse times: 480 Comment times: 0

ASP.NET Remoting体系结构(三)


Head photo

Go homepage
Upload pictures
Write articles

ASP.NET Remoting体系结构(三):RemotingConfiguration类

RemotingConfiguration类
由于像IP地址和端口号这样的信息在开发和实践中常需要改变,因此.NET Remoting 体系中设计了RemotingConfiguration类使得开发人员可以用它来读取XML格式的位置文件来配置远程处理基础结构。
RemotingConfiguration类最重要的是Configure()方法用它直接读取配制文件就可以设置许多.NET Remoting 的基础结构。
l 服务器端常用配置,代码如下:




mode="Singleton" //远程类对象激活方式
type="RemotableType, RemotableType" //远程类对象类名,远程类对象所在类库
objectUri="RemotableType.rem"//指定统一资源标识符的终结点
/>


//所选信道为http信道还是tcp信道,和侦听的端口号




l 客户端常用配置,代码如下:




type="RemotableType, RemotableType"//远程类对象类名,远程类对象所在类库
url="http://localhost:8989/RemotableType.rem"//将要连接的远程类的ip和端口号
/> //及objecturl




注意:上面的配置适合在本地计算机运行,如果在不同的计算机上测试,那么wellknown节点中的url属性应该指定相应的计算机IP地址,例如url="http://192.168.1.99:8989/ RemotableType.rem"。





There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.