Thursday, June 7, 2012

Windows DNS logging quirk if you specify alternate path

In Windows DNS, the default logging path is in %SystemRoot%.  However, if you change this path (e.g. D:\DNS\dns.log), you need to make sure you do one critical thing:

CREATE THE NECESSARY FOLDER STRUCTURE!!!

In the case of the path I listed above, it is implied that there is a "D:" drive but you need to create a folder called "DNS" before you cycle the dns service.  Cycling the DNS service will create the "dns.log" file but not the folders in the path.

This may seem obvious to some but there is no indication that this doesn't work.  There is no, "This folder doesn't exist, would you like to create it?" -- or whatever Microsoft usually says whenever you specify a path that doesn't exist.  The service itself doesn't complain, it's just configured to log and simply never does.

In a nuthsell, the service WON'T create any missing folder structure but WILL create the log file itself.