How to Find the Right Log File for Your IIS Site

I seldom use the IIS logs and whenever I must use them, I have the same question: What file matches the site I am interested in? The answer to that question is easy to find, but it is not that obvious to remember it. Maybe this post does the trick for me.

 

Use the IIS Sites overview to find your site Id

In some versions of the IIS Manager you can simply select the sites node and get a list with all your sites. Next to the names is the Id column, that you need to match the log folder to your site:

The default location for the IIS log folders on Windows Server is %SystemDrive%\inetpub\logs\LogFiles. The pattern for the folder itself is W3SVC + the Id from above:

Inside this folder are all the log files of that specific side. Congratulations If you reach this point – you can stop reading this post and focus on your log messages. If this did not work, one of the following approaches may help.

 

Use the Advanced Settings dialog

Not all versions of the IIS Managers offer the simple display of site Ids. If you can’t find it there, you can open your site, go to the Advanced Settings and look at the Id there:

 

Can’t find the log folder?

If your administrator moved the log files, you can use the site settings dialog to locate it. Open the Logging dialog by clicking on its icon:

The directory property is the location where all IIS log folders are stored:

From there on you need your site Id to get the right folder as explained above.

 

Conclusion

Those approaches should help you to locate the folder for your IIS site. It is not that hard, but it could be a lot simpler.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.