.net 程序在线升级
来源:互联网 发布:足球数据分析大师 编辑:程序博客网 时间:2024/05/24 15:36
http://www.cnblogs.com/KnightsWarrior/archive/2010/10/20/1856255.html
http://www.cnblogs.com/stoneniqiu/p/3806558.html
配置IIS http://www.sufeinet.com/thread-291-1-1.html
Apache 用户名和密码验证
http://blog.csdn.net/liushu_it/article/details/18735449
借鉴了圣殿骑士写的dll,更改了下载后删除old文件
- 在引用中添加AutoUpdater.dll,代码中添加
Imports KnightsWarriorAutoupdater '实现自动更新的dll
- 服务器端配置文件 AutoupdateService.xml
下面的代码示例会把文件夹tt以及里面的1.txt文件一起拷贝到客户端中,size为文件大小,并非占用空间,必须写对
<?xml version="1.0" encoding="utf-8"?><updateFiles> <file path="1.txt" url="http://10.*.*.*:8011/SerialWrite/tt/1.txt" lastver="3.2.1.2" size="8" needRestart="True" /></updateFiles>
- 客户端配置文件 AutoUpdater.config
<?xml version="1.0" encoding="utf-8"?><Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Enabled>true</Enabled> <ServerUrl>http://10.*.*.*:8011/SerialWrite/AutoupdateService.xml</ServerUrl> <UpdateFileList> <LocalFile path="1.txt" lastver="3.2.1.2" size="8" /> </UpdateFileList></Config>
- 更新的代码
'*********************'自动更新程序'*********************Dim bHasError As Boolean = FalseDim autoUpdater As IAutoUpdater = New AutoUpdater()Try autoUpdater.Update()Catch ex As WebException MessageBox.Show("连接自动升级服务器出错,请检查网络连接或联系软件提供者。(Connect remote update server fail.)", "更新程序(UPDATE SOFTWRAE)", MessageBoxButtons.OK, MessageBoxIcon.Error) bHasError = TrueCatch ex As XmlException MessageBox.Show("服务器上的升级文件(AutoupdateService.xml)出错。(Download the upgrade file error.)", "更新程序(UPDATE SOFTWRAE)", MessageBoxButtons.OK, MessageBoxIcon.Error) bHasError = TrueCatch ex As Exception MessageBox.Show("更新程序出错。(An error occurred during the upgrade process.)", "更新程序(UPDATE SOFTWRAE)", MessageBoxButtons.OK, MessageBoxIcon.Error) bHasError = TrueFinally If bHasError = True Then Try autoUpdater.RollBack() Catch ex As Exception MsgBox(ex.Message) End Try End IfEnd Try
阅读全文
0 0
- .net 程序在线升级
- .NET开发的在线升级程序
- VB.NET在线升级程序源代码,可以独立使用
- ASP在线升级程序
- ASP在线升级程序
- 在线升级程序
- ASP在线升级程序
- ASP在线升级程序
- ASP在线升级程序
- F020在线升级程序
- 在线升级程序流程图
- Winform 程序在线升级
- 在线升级Android程序
- C/S在线升级程序
- C#程序在线升级代码
- C#程序在线升级代码
- DSP在线升级程序步骤
- [VB.NET源码]文件在线更新升级
- Uncaught TypeError: Cannot read property 'options' of undefined
- 生产者消费者 Java 实现
- HBase学习笔记——高表与宽表的选择
- Flyway的简单介绍及使用
- 远程终端IP地址查询助手
- .net 程序在线升级
- 省级怎么发表期刊
- windows上loadrunner录制脚本为空的解决方法
- c# zedgraph控件的简单例子
- 使用jxls分页导出excel
- 从程序员到CTO的Java技术路线图
- React学习day01
- IHttpModule接口
- Android studio java.lang.UnsatisfiedLinkError加载.so文件失败解决办法