I have a legacy Classic ASP application as well as some .NET pages that has thousands of pages overall and I know for a fact that a good number of them are no longer used/depreciated that should be removed in an effort to clean up the codebase. They are hosted under IIS, and I was just wondering how I can go about finding out which pages are not hit so I could safely remove them.
Use log parser to find which pages exists in your system and again use logParser to find which pages are hit in your system. Find their differences for depreciated pages.
Which Pages Exists in your System
logparser -i:FS "SELECT Path from c:\inetpub\wwwroot*.* ORDER BY Path
Which Pages are hit in your Application
logparser "select cs-uri-stem from [LogFileName] where cs-uri-stem like ‘%aspx%’ or cs-uri-stem like ‘%ashx%’ group by cs-uri-stem order by cs-uri-stem"
These will generate you two different lists. Import them to database (SQL Server) and use following query
SELECT Path FROM PAGES_EXISTS
EXCEPT
SELECT Path FROM PAGES_HIT
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With