What is the easiest way to track or view Urls 404 (Not Found) requests in Windows 2003 IIS-6? We are moving to a new CMS, and we are using ISAPI Rewrite to redirect old Urls to the new Urls, but we want to make sure we are not missing important Urls slipping through the cracks. Is there way to record each 404 Url in a text file somewhere? We are using Windows Server 2003 IIS-6. Can IIS do this? Maybe we need a tool? Custom code? Thanks.
Take a look at the access logs %system32%\LogFiles\W3SVC1\exyymmdd.log .
You can use LogParser to query ( http://www.microsoft.com/DownLoads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en )
Something like :
logparser "select count(cs-uri-stem), cs-uri-stem from <LOGFILE>.log where sc-status=401 group by cs-uri-stem order by count(cs-uri-stem)"
Have a look at this thread for queries you can use with LogParser.
Also consider ELMAH. It's easy to add and you can have it setup to email on 404 errors (assuming that they aren't too chatty), or to log to a database or disk or in-memory, or even twitter. It's well worth adding as a first step to any project that you create.