智能客户端中的缓存问题

buaawjh 2005-02-06 10:59:31
项目架构:
1--采用智能客户端的架构,结合.net Remoting技术
2--用户在客户端只需要部署一个MainForm程序,点击具体的菜单的时候,就可以从远程服务器上下载具体功能的窗体(Control形式),在客户端应用程序下也建有一个cache目录,如果版本和服务器上的一样,就不下载了。
3--每个窗体没有使用sn强签名

问题:
1--有新版本了,配置正确,用户的cache目录中的对应版本也正确
2--但是运行的时候,程序运行的还是旧的版本
3--在用户winnt\assembly\download\下有过去的所有版本
求问:
1--如何让程序一定运行最新的版本
2--如何清楚winnt\assembly\download\的缓存,不要用gacutil(用户那里没有这个工具)
最后:
谢谢每位关心这个问题的人,若解决了,我一定把方法贴上:)
...全文
212 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
buaawjh 2005-02-07
  • 打赏
  • 举报
回复
试验过了,Assembly Download Cache里的全部都被清了。
提醒继续关注的朋友,我的下载的版本是正确的,只是运行的时候不正确。
忘了说:我运行调用的方法是Assembly.Load("cache\....")
timiil 2005-02-07
  • 打赏
  • 举报
回复
我的办法是读取Assembly文件的CRC32值,若不是最新版本或被人修改过,就下载。
jackie615 2005-02-07
  • 打赏
  • 举报
回复
kenMoxi 2005-02-07
  • 打赏
  • 举报
回复
up
beijingbeerman 2005-02-07
  • 打赏
  • 举报
回复
up
LoveCherry 2005-02-06
  • 打赏
  • 举报
回复
你试验过可以了吗?谢谢
buaawjh 2005-02-06
  • 打赏
  • 举报
回复
找到答案了,简单的说就是删文件夹
参考网址
http://www.dotnet-magazin.de/itr/online_artikel/psecom,id,550,nodeid,31.html
还有一段代码:
using System;
using System.Text;
using System.Runtime.InteropServices;
using System.IO;
sealed class App
{
[DllImport("fusion.dll",CharSet=CharSet.Unicode,SetLastError=true)]
static extern int GetCachePath(int flags, [Out] StringBuilder path, ref int count);
static void Main() {
StringBuilder path = new StringBuilder();
int count = 260;
GetCachePath(4, path, ref count);
try {
Directory.Delete(path.ToString(), true);
}
catch(SystemException) {
// ignore
}
}
}
This unsupported API won't work for the next .NET Framework release...
http://danielvl.blogspot.com
buaawjh 2005-02-06
  • 打赏
  • 举报
回复
看到一篇法语文章,讲述如何通过API删除ADC的(Assembly Download Cache),消化完告诉大家,谢谢了!
liulxmooo 2005-02-06
  • 打赏
  • 举报
回复
up
LoveCherry 2005-02-06
  • 打赏
  • 举报
回复
关注
AllenTing 2005-02-06
  • 打赏
  • 举报
回复
不会,帮顶

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧