Thursday, September 27, 2007

I was attempting to use the Microsoft.MetadirectoryServices.Logging dll to implement some basic logging in our environment. I was receiving this error:

An unexpected end of file parsing NAME has occurred. Line 1, position 2.

When attempting to load the logging.xml file. The solution was to add the following line to the top of the logging.xml file:

<?xml version="1.0" encoding="utf-16" ?>
<rules-extension-properties>
     <logging>
          <use-single-log>false</use-single-log>
          <file-name>sync.log</file-name>
          <logging-level>2</logging-level>
     </logging>
</rules-extension-properties>