Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Tell Which Pages Aren't Hit in IIS?

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.

like image 612
KJ3 Avatar asked Sep 30 '22 18:09

KJ3


1 Answers

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.

  1. Which Pages Exists in your System

    logparser -i:FS "SELECT Path from c:\inetpub\wwwroot*.* ORDER BY Path

  2. 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"

  3. 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

like image 159
Atilla Ozgur Avatar answered Oct 13 '22 22:10

Atilla Ozgur