Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 6 down vote accepted

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)"
share|improve this answer
    
Thanks for both the log location and the LogParser tool. –  James Lawruk Sep 16 '09 at 20:14

Have a look at this thread for queries you can use with LogParser.

share|improve this answer

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.

share|improve this answer
    
Thanks. Yes, we actually do use ELMAH for our ASP.NET applications. –  James Lawruk Sep 17 '09 at 13:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.