简体   繁体   中英

Identifying files in a directory used by a website in IIS6 or IIS7.5 for a Classic ASP Web App

I've inherited a legacy web app, written in Classic ASP which at one point was re-written (still in Classic ASP though), and the original application files were never removed. Most of these un-necessary files are ASP, HTM, INC, JS & CSS file types.

This web app has no planned replacement or migration to .NET, but I'd like to be able to clean up the directory so that I can load the site in Visual Studio and be able to perform solution searches for code fragments and have some level of confidence that what I am searching for actually exists in currently used code.

I was able to eliminate some files by programatically parsing the IIS log files, but that only tells me what was requested by the client, and doesn't tell me which files are being used by other ASP pages as includes.

I'd like to know whether there is an internal IIS log or trace that I can enable to identify which files are actively being processed by the IIS engine. I have IIS 6 and IIS 7.5 at my disposal.

Any other quick methods for determining this would be helpful also. This is not a high business priority but slows me down at dev time and is quite an annoyance. Obviously I could write an app to catalog all the files and crawl the text of each one looking for includes, but I'd rather focus my efforts on delivering value to the business.

Thanks in advance.

One approach is using Sysinternals Process Monitor . You can set Four filters like following image to find out all files accessed during application life-cycle. The w3wp.exe is IIS worker process which runs Web applications. You must set Path filter to begin with physical path of the Web application.

在此处输入图片说明 45

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM