-
大小: 383KB文件类型: .rar金币: 2下载: 2 次发布日期: 2021-12-11
- 语言: C#
- 标签: c# webService 源代码
资源简介
c#应用webService实现自动升级
1、模块化设计,独立于用户应用程序
2、支持下载进度
3、支持用户程序的版本检测,并决定是否可升级
4、提供自动产生用户程序版本工具

代码片段和文件信息
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.IO;
using System.xml;
[WebService(Namespace = “http://tempuri.org/“)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
private IAutoUpdateServer handle = new AutoUpdateServer();
public Service () {
//如果使用设计的组件,请取消注释以下行
//InitializeComponent();
//handle.produceVersion(Server.MapPath(@“Bin\updateFile\“)Server.MapPath(@“Bin\update.xml“) “1.1.0.0“ “升级“);
}
[WebMethod(Description = “取得更新版本“)]
public string getVer()
{
return(handle.getVer());
}
[WebMethod(Description = ““)]
public xmlDocument getUpdateInfoFile(string fileNamelong count)
{
return handle.getUpdateInfoFile(fileName count);
//int buffer_size = 1024 * 1024;//一次读取的字节数
//xmlDocument doc = new xmlDocument();
//doc.Load(Server.MapPath(“bin\\download.xml“));
//string path = Server.MapPath(“bin\\“);
//xmlNode node = doc.SelectSingleNode(“downfile“);
//FileStream fs = File.OpenRead(path + fileName);
//BinaryReader br = new BinaryReader(fs);
//fs.Seek(count * buffer_size SeekOrigin.Begin);
//byte[] buffer = br.ReadBytes(buffer_size);
//if (buffer.Length < buffer_size)
// node.Attributes[“isComplete“].Value = “1“;
//else
// node.Attributes[“isComplete“].Value = “0“;
////这里是文件的实际内容,使用了base64String编码
//node.Attributes[“value“].InnerText = Convert.Tobase64String(buffer 0 buffer.Length);
//br.Close();
//fs.Close();
//return doc;
}
[WebMethod(Description = ““)]
public xmlDocument getFile(string fileName long count)
{
return (handle.getFile(fileNamecount ));
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2065 2010-11-08 10:45 AutoUpdate\App_Code\Service.cs
文件 4613 2010-11-03 17:52 AutoUpdate\AutoUpdate.sln
..A..H. 41472 2010-11-08 14:47 AutoUpdate\AutoUpdate.suo
文件 884 2010-11-04 15:19 AutoUpdate\AutoUpdateClient\app.config
文件 248 2010-11-06 16:58 AutoUpdate\AutoUpdateClient\AutoUpdateClient.cs
文件 4708 2010-11-08 10:47 AutoUpdate\AutoUpdateClient\AutoUpdateClient.csproj
文件 418 2010-11-04 15:21 AutoUpdate\AutoUpdateClient\AutoUpdateClient.csproj.user
文件 32768 2010-11-08 14:44 AutoUpdate\AutoUpdateClient\bin\Debug\AutoUpdateClient.exe
文件 884 2010-11-04 15:19 AutoUpdate\AutoUpdateClient\bin\Debug\AutoUpdateClient.exe.config
文件 44544 2010-11-08 14:44 AutoUpdate\AutoUpdateClient\bin\Debug\AutoUpdateClient.pdb
文件 5632 2005-11-11 22:25 AutoUpdate\AutoUpdateClient\bin\Debug\AutoUpdateClient.vshost.exe
文件 884 2010-11-04 15:19 AutoUpdate\AutoUpdateClient\bin\Debug\AutoUpdateClient.vshost.exe.config
文件 1125 2010-11-08 11:40 AutoUpdate\AutoUpdateClient\bin\Debug\update.xm
文件 1125 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\update1.xm
文件 135168 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\posClient.exe
文件 2885 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\posClient.exe.config
文件 1125 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\update.xm
文件 28672 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\Yjg.Pos.Common.dll
文件 24576 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\Yjg.Pos.Service.Authority.dll
文件 212992 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\Yjg.Pos.Service.Calculator.dll
文件 20480 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\Yjg.Pos.Service.Db.dll
文件 20480 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\Yjg.Pos.Service.Goods.dll
文件 16384 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\Yjg.Pos.Service.LineDisplay.dll
文件 16384 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\Yjg.Pos.Service.Printer.dll
文件 45056 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\Yjg.Pos.Service.Sale.dll
文件 16384 2010-11-08 11:59 AutoUpdate\AutoUpdateClient\bin\Debug\updateFiles\Yjg.Pos.Service.Vip.dll
文件 135168 2010-11-06 09:07 AutoUpdate\AutoUpdateClient\bin\Debugview.exe
文件 8706 2010-11-08 14:44 AutoUpdate\AutoUpdateClient\Form1.cs
文件 5912 2010-11-08 11:50 AutoUpdate\AutoUpdateClient\Form1.Designer.cs
文件 5814 2010-11-08 11:50 AutoUpdate\AutoUpdateClient\Form1.resx
............此处省略90个文件信息
相关资源
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
评论
共有 条评论