How to find IIS7 logs for your site

I’m not a power user of IIS, so when I do use it, I sometimes need a reminder of how to find something. Recently, I wanted to view the logs of a site, that was running in IIS. IIS also contained several other web and ftp sites. The first step was finding the location of the logs. This was actually pretty easy.

In the IIS console, just open logging, and you can see the location of the logs. Here, it’s D:\LOGS:

I went to D:\LOGS, and found this:

So how do I equate the particular website I want the logs for with the log directory? In the IIS Console, select your site. In the Manage Web Site section of the screen, click on the Advanced Settings link. This will bring up a dialog box. The 3rd value in the box is the site’s service ID. Here it’s 3. This equates to a log directory. Because I happen to be looking at a web site, the log directory for my site is W3SVC3. If the ID were 18, it would be W3SVC18, and if the site were an ftp site, it would be FTPSVC18.

Advertisements
This entry was posted in Web Development. Bookmark the permalink.

2 Responses to How to find IIS7 logs for your site

  1. I’ve often wondered about this – Useful post. Thank you.

  2. Daniel Comp says:

    You’d think it would be a little more obvious to find. Thanks for the post

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s