已有56人关注
关于remoting文件传递请教十一
发表在C#图书答疑 2010-07-27
是否精华
版块置顶:
明日科技,小科,满园春色,东方,您们好!
1..关于“remoting文件流不能多个,只能一个”的问题,本质上“在一个信道上网络流只能一个”,有关系似的。有难度就不要浪费您们的宝贵时间了。
2..VisualC#开发技术大全,785页,39.3.5 简单Remoting运行测试中的图39.5,服务器端弹出MessgeBox.
试验成功了!  如果想服务器端弹出tab(数据库表格)怎么办?能提供思路吗?
3..关于//using System.Runtime.Remoting.Channels.Tcp;
(1)在VisualC#开发技术大全,785页,39.3.5 简单Remoting运行测试中的图39.5中,
     using System.Runtime.Remoting.Channels.Tcp;是有效的,正确的。
     但是.Net引用列表中找不到System.Runtime.Remoting.Channels.Tcp。
//.........................................................................//
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
//请注意:using System.Runtime.Remoting.Channels.显示出Tcp等3个属性

using System.Runtime.Remoting.Channels.Tcp;//这一行通过。ok..



(2)向c#程序开发范例宝典807页,实例549,=19.2中增加
     using System.Runtime.Remoting.Channels.Tcp;是无效的,错误的。
//..................................................................//
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
//请注意:using System.Runtime.Remoting.Channels.不显示出Tcp等3个属性。
//using System.Runtime.Remoting.Channels.Tcp;//这一行通不过。不知道什么原因?
//初步结论:好像系统设置有关,究竟什么地方?

//...................................................//
     在.Net引用列表中找不到。这样无法引入以下语句:
     ChannelServices.RegisterChannel(new TcpChannel(9999), false);
     WellKnownClientTypeEntry RemotingConfing = new WellKnownClientTypeEntry(typeof   (FarClass), "tcp://localhost:9999/TcpService");
     RemotingConfiguration.RegisterWellKnownClientType(RemotingConfing);
////////////////////////////////////////////////////////////////////////


分享到:
精彩评论 1
小科_mrkj
学分:43 LV2
2010-07-26
沙发
曹老师:
     您好,问题回复如下:
(1)同一时间段内,一个信道上只能有一个网络流传输。
(2)在“添加引用”对话框中添加System.Runtime.Remoting就可以了,这个dll组件包含了Remoting的所有命名空间。
(3)首先在“添加引用”对话框中添加System.Runtime.Remoting引用,然后在命名空间区域添加using System.Runtime.Remoting.Channels.Tcp;命名空间。
首页上一页 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经营性网站备案信息 营业执照