已有56人关注
关于remoting文件传递请教七。
发表在C#图书答疑 2010-07-03
是否精华
版块置顶:
1..感谢您们及时回帖。
2..我等待您们的新书,等待有关远程,线程,进程之间的通信等方面的专题好书!
3..E:\c#范例宝典2008\mingrisoft\19\EX19_03,服务器端的回答,满意,知道怎么回事。
   客户端的chnl怎样获得?详细请看一下内容:
private void RemotingClientForm_Load(object sender, EventArgs e)
{ChannelServices.RegisterChannel(new TcpChannel());
WellKnownClientTypeEntry RemotingConfing = new WellKnownClientTypeEntry(typeof(FarClass), "tcp://localhost:9999/TcpService");
RemotingConfiguration.RegisterWellKnownClientType(RemotingConfing);
// RemotingConfiguration.Configure("RemotingClient.exe.Config",false);
fc = new FarClass();
}
警告1 “System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(System.Runtime.Remoting.Channels.IChannel)”已过时:“Use System.Runtime.Remoting.ChannelServices.RegisterChannel(IChannel chnl, bool ensureSecurity) instead.” E:\c#范例宝典2008\mingrisoft\19\EX19_03\RemotingClient\RemotingClient\RemotingClientForm.cs 33 12 RemotingClient
//////////////////////////////////////////////////////////////////////////
对于这条语句系统就不认了,??? 
ChannelServices.RegisterChannel(new TcpChannel());
系统提示”已过时:“Use
怎样选择(IChannel chnl, bool ensureSecurity)参数呢?
(1)chnl从哪儿来?
(2)true/flase,选哪一个?
4..也许今后我可能还提出范围之外的问题,按读者的需求来理解就行了。您们的回答我满意。
分享到:
精彩评论 1
满园春色关不住
学分:0 LV1
TA的每日心情
努力自律
2023-11-19 09:49:04
2010-07-05
沙发
曹老师:
您好,很高兴再一次回答您的问题,对于您提出的问题可以通过如下方法解决。
第一个问题:
问:
对于这条语句系统就不认了,??? 
ChannelServices.RegisterChannel(new TcpChannel());
答:
ChannelServices.RegisterChannel方法提供两个重载,第
一个重载已经过时,这意味着未来的FrameWork版本中可能会
不再使用第一个重载方法。

问:
怎样选择(IChannel chnl, bool ensureSecurity)参数呢?
chnl从哪儿来?
答:
chnl是实现了Ichannel接口的Channel对象。

问:
怎样选择(IChannel chnl, bool ensureSecurity)参数呢?
true/flase,选哪一个?
答:
参数ensureSecurity是一个布尔类型值,如果启用了安全,则
为 true;否则为 false。将该值设置为false 将不会使在 TCP
或IPC信道上所做的安全设置无效。

曹老师,感谢您对明日图书的支持。祝您身体健康!
首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照