I'm using
SmarterStats for my blog statistics and have been annoyed by two things for a while. I get no statistics for bandwidth and referers. I looked around on the web and found that these things are actually not logged in IIS by default. I found
this article describing how to enable it in IIS 6. Now I had to find out how to do the same thing in IIS 7. As I and
others have mentioned earlier, IIS 7 in Vista don't have much UI yet, so most of the work is done in config files. I checked out the
schema and came up with this:
<sites>
<site
name="Default Web Site" id="1">
<application
path="/" applicationPool="ASP.NET 1.1">
<virtualDirectory
path="/" physicalPath="…" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:" />
</bindings>
<logFile
logExtFileFlags="Date, Time, ClientIP, UserName, ServerIP, Method, UriStem,
UriQuery, HttpStatus, Win32Status, ServerPort, UserAgent, HttpSubStatus,
BytesSent, BytesRecv, Referer" />
</site>
</sites>After these changes I went into SmarterStats and found values for both bandwidth and referers. Fantastic!