帮助了解我们的.Net应用程序在哪里找到文件 [英] Help understanding where our .Net app is finding a file

查看:81
本文介绍了帮助了解我们的.Net应用程序在哪里找到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个VB.Net 2005应用程序,该应用程序使用WebBrowser控件加载简单的HTML文件以显示一些信息.愚蠢的是,该路径是硬编码到应用程序启动文件夹的,但是,哦.

该文件最初包含在部署包中,但后来对其内容进行了修改,仅提供了更新的HTML文件.但是,重新加载应用程序时,它仍会加载旧内容.

我们猜测该文件以某种方式缓存在某个地方,但无法确定在哪里查找.为了确认我们的预感,我们从应用查找路径中物理删除(删除了)HTM文件.然后,我们在Windows资源管理器中确认它确实消失了.

然后,我们重新加载了该程序,但仍显示旧内容.试图清除IE历史记录,临时文件等均无济于事.好像.NET应用程序几乎是在虚拟创建文件吗?

我们还建议使用ProcessMon实用程序(顺便说一句,很酷)来跟踪应用程序,这似乎表明该文件已加载了其原始路径和名称-即使该文件不存在.即使文件已物理消失,在Web浏览器控件中右键单击属性并查看属性也会显示原始日期.

到目前为止,我们仅在Vista 32位客户端上进行测试(这一切我们都可以使用).

谁能告诉我们我们在做什么或不做什么愚蠢的事情,或者下一步该去哪里看?

We have a VB.Net 2005 app that uses the WebBrowser control to load a simple HTML file to display some info. Stupidly the path is hard coded to the application startup folder, but, oh well.

Originally the file was included in the deployment package but later its content was modified and just the updated HTML file was delivered. However, when the app is reloaded it still loads the old content.

We are guessing that the file is cached somehow somewhere but cannot figure out where to look. To confirm our hunch we physically removed (deleted) the HTM file from the path where the app looks for it. We then confirmed in Windows Explorer that it is really gone.

Then we reloaded the program but STILL it displays the old content. Tried clearing IE history, temp files, etc. all to no avail. It seems almost like the .NET app creates the file virtually?

We also followed a suggestion to use ProcessMon utility (which is way cool, by the way) to track the app and it seems to shows that the file was loaded with its original path and name - even though it does NOT exist there. Right clicking properties in the web browser control and viewing the properties shows the original date even though the file is physically gone.

So far we are only testing on Vista 32 bit clients (its all we have handy).

Can anybody tell us what stupid thing we are doing or NOT doing here or where to look next?

推荐答案

我假设您没有消息来源该应用程序要查看的代码?

使用反射器 [
I''m assuming you don''t have the source code for this application to look at?

Use Reflector [^] to look at it and see what might be happening.


进入C:\ Windows \ Microsoft.Net文件夹.
进入.Net v2.0文件夹.
进入"ASP.NET临时文件"文件夹.
删除所有文件.

希望您的旧内容现在应该消失了.
Go into the C:\ Windows \ Microsoft.Net folder.
Go into the .Net v2.0 folder.
Go into the Temporary ASP.NET Files folder.
Delete all files.

Hopefully, your old content should now be gone.


谢谢,马克.目前没有任何消息来源.可以工作得到它.但是我认为在这种情况下这不是很相关.我们确定源没有创建文件内容.它仅被编写为指向并加载现有文件.

正在运行的进程(如ProcessMon中所示)显示了在原始位置上对原始指定文件名的访问,即使有问题的文件已从文件系统中完全删除,并且根本没有出现在该文件系统中在执行应用程序期间.我们甚至对文件的所有路径进行了全面搜索,但根本不存在该文件.

但是,当应用程序运行时,它已成功加载到WebBrowser控件中,而当我们右键单击浏览器控件中的属性时,它显示了要从原始文件名在原始位置加载的页面?

Abhinav,按照您的建议,可惜结果没有变化.

太奇怪了.可能只是基本内容,但无法弄清楚是什么.

还有其他想法吗?

非常感谢
Thank you, Mark. No source at the moment. Can work to get it. But I think that is not very relevant in this case. We are certain the source does not create the file contents. It was only written to point to and load the existing file.

The running process (as shown in ProcessMon) shows access to the originally specified filename at the original location but even though the file in question has been removed from the file system entirely and it does not appear there at all during execution of the app. We even did a full search of all paths for the file and it simply does not exist.

However, when the application is running, it loads successfully in the WebBrowser control and when we right click in the browser control for properties it shows the page to be loaded from the original filename at the original location?

Abhinav, followed your suggestion but alas w/ no change in outcome.

So weird. Probably just something basic but cannot figure out what.

Any other ideas?

Thanks much


这篇关于帮助了解我们的.Net应用程序在哪里找到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆