Udostępnij za pośrednictwem


LOGPARSER #14: TOP 20 pages with specific HTTP return code

Digging into each ASPX page returning a specific error code.

We used this script at a customer to get the pages with most 401 errors and also checked pages with most hits. You’ probably find these to be almost the same list. If you have Windows Authentication and your domain used NTLM instead of Kerberos this is why. Each page request will give your about 4-5 of the 401’s in the log for each page hit. If your users in other parts of the world (far from your servers) complain about performance and none of the others do, maybe latency is the problem.

SELECT
TOP 20 cs-uri-stem,
sc-status,
Count(*) AS Total
INTO TOP20PagesWith401.txt
FROM
logs\iis\ex*.log
WHERE
TO_LOWERCASE(cs-uri-stem) LIKE '%.aspx'
and sc-status=401
GROUP BY
cs-uri-stem,
sc-status
ORDER BY
Total,
cs-uri-stem,
sc-status
DESC

Oh.. I almost forgot. If you enable anonymous access on e.g. image folders you should see a large drop in nr of 401’s.

Hope this helps? Happy log file digging :)

//Anders