摘要:
我采用的是Java socket客户端 协议时这样的 报文结构(3,4,5,6,17,21,25,29,33,38,43,47,51) 通用报文结构分为两部分,包头和包体。 下面是一个完整PDU(协议数据单元)的布局: PDU 域 长度 类型 说明 包头 Length 4 Integer 此域表示消息包的总长度 = 包头长度 + 包体长度,采用网络字节序。单个PDU的最大长度为30K字节,超过时需...
阅读全文
posted @ 2010-07-02 11:03
liufei
阅读(1300)
推荐(0)
摘要:
http://www.cnblogs.com/vhtt/ 服务器用来接收文件,不停的监听端口,有发送文件就马上开始接收文件服务端代码:C#代码usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usin...
阅读全文
posted @ 2010-07-02 10:52
liufei
阅读(1429)
推荐(0)
摘要:
一.“远程服务器返回错误: (501) 未实现”的错误 解决方法:Web服务扩展中的WebDAV惹得祸,将IIS的"Web服务扩展"中的"WebDAV"设置成"允许"!PS:iis6的 webdav支持 其实就是个基于http的ftp功能 ,明确iis不能直接上传文件,需要扩展支持的话应该不会饶弯路吧? 二.“远程服务器返回错误 (403) 已禁止”...
阅读全文
posted @ 2010-06-30 10:23
liufei
阅读(343)
推荐(0)
摘要:
usingSystem; usingSystem.Collections.Generic; usingSystem.ComponentModel; usingSystem.Data; usingSystem.Drawing; usingSystem.Text; usingSystem.Windows.Forms; usingSystem.IO; usingSystem.Runtime.Intero...
阅读全文
posted @ 2010-06-30 09:11
liufei
阅读(773)
推荐(0)
摘要:
protected void btn_Download_Click(object sender, EventArgs e) { string strFileUploadPath = "Files/"; //从列表框控件中读取选择的文件名 string strFileName = lb_FileList.SelectedValue; //组合成物理路径 string strFilePhysicalP...
阅读全文
posted @ 2010-06-29 13:18
liufei
阅读(410)
推荐(0)
摘要:
(一)写入:Stream ms;byte []picbyte; openFileDialog1.Filter = SystemConst.IMAGE_FILE_FILTER;if (this.openFileDialog1.ShowDialog() == DialogResult.OK) {if ((ms = openFileDialog1.OpenFile()) != n...
阅读全文
posted @ 2010-06-28 12:34
liufei
阅读(837)
推荐(0)
摘要:
private void CopyFile(string fromFile, string toFile, int lengthEachTime) { FileStream fileToCopy = new FileStream(fromFile, FileMode.Open, FileAccess.Read); FileStream copyToFile = new FileStream(toF...
阅读全文
posted @ 2010-06-28 12:33
liufei
阅读(366)
推荐(0)
摘要:
usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.We...
阅读全文
posted @ 2010-06-28 12:28
liufei
阅读(203)
推荐(0)
摘要:
C#中控制IIS服务停止ServiceController sc = new ServiceController("iisadmin");if(sc.Status=ServiceControllerStatus.Running) sc.Stop(); 启动IIS服务ServiceController sc = new ServiceController("iisadmin"); sc.Start(...
阅读全文
posted @ 2010-06-28 12:26
liufei
阅读(608)
推荐(0)
摘要:
来源:互联网winform程序相对web程序而言,功能更强大编程更方便,但软件更新却相当麻烦,要到客户端一台一台地升级,面对这个实际问题,在最近的一个小项目中,本人设计了一个通过软件实现自动升级技术方案,弥补了这一缺陷,有较好的参考价值。一、升级的好处 长期以来,广大程序员为到底是使用Client/Server,还是使用Browser/Server结构争论不休,在这些争论当中,C/S结构的程序的可...
阅读全文
posted @ 2010-06-28 12:25
liufei
阅读(336)
推荐(0)