3

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.

6

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

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

| improve this answer | |
1

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.

| 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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