title: Receiving an NLog error when running from our server, yet running locally is fine
body: <p>I'm experiencing an odd error involving NLog (ver2.1.0.0) in one of our older .net windows forms applications.  </p>
  
  <p>I made a change to the application &amp; was able to run &amp; test the change successfully, with no issues.  When we uploaded it to our QA Server (Windows Server  2008, I believe), we receive the following error:
  <strong>An error occurred creating the configuration section handler for nlog: Exception occurred when loading configuration from .exe.Config line 58</strong></p>
  
  <p>Oddly, I can't seem to figure out why this is happening.  Here's my app.config code for nLog.  Line 58 is the first line, beginning with <strong>&lt; nlog xmlns...</strong></p>
  
  <pre><code>&lt;nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        throwExceptions="true" internalLogFile="c:\temp\nlog.txt" internalLogLevel="Debug"&gt;
  &lt;variable name="applicationName" value="Load Import"/&gt;
  &lt;targets&gt;
    &lt;target name="console" type="Console" layout="${date:format=HH\:mm\:ss} ${logger} ${level} ${message}${onexception:${newline}Exception\:${newline}${exception:format=tostring}}" /&gt;
    &lt;target name="mail" xsi:type="Mail" smtpServer="relay.ourcompany.com" from="" to="" addNewLines="true" subject="ImportBill - ${level} ${onexception: Exception}" layout="Date: ${longdate}${newline}Level: ${uppercase:${level}}${newline}Logger: ${logger}${newline}Machine: ${machinename}${newline}Message: ${message}${onexception:${newline}Exception\:${newline}${exception:format=tostring}}${newline}" /&gt;
    &lt;target name="database" xsi:type="Database" connectionStringName="Logging" keepConnection="true"&gt;
   &lt;commandText&gt;
      exec [nlog].[Message_Add]
      @LogDate = @logDate,
      @MachineName = @machineName,
      @ProcessName = @processName,
      @Version = @assemblyVersion,
      @Logger = @logger,
      @LogLevel = @logLevel,
      @Origin = @callSite,
      @Message = @message,
      @Exception = @exception,
      @StackTrace = @stackTrace,
      @WindowsIdentity = @windowsIdentity,
      @BaseDirectory = @baseDirectory,
      @AdditionalInfo = @additionalInfo,
      @RequestIdentifier = @requestIdentifier,
      @Log4JEvent = @log4jEvent
    &lt;/commandText&gt;
    &lt;parameter name="@logDate" layout="${date:format=yyyy-MM-dd HH\:mm\:ss.fff}" /&gt;
    &lt;parameter name="@machineName" layout="${machinename}" /&gt;
    &lt;parameter name="@ProcessName" layout="${processname}" /&gt;
    &lt;parameter name="@assemblyVersion" layout="${assembly-version}" /&gt;
    &lt;parameter name="@logger" layout="${logger}" /&gt;
    &lt;parameter name="@logLevel" layout="${level}" /&gt;
    &lt;parameter name="@callSite" layout="${callsite}" /&gt;
    &lt;parameter name="@message" layout="${message}" /&gt;
    &lt;parameter name="@exception" layout="${exception:format=tostring}" /&gt;
    &lt;parameter name="@stackTrace" layout="${stacktrace}" /&gt;
    &lt;parameter name="@windowsIdentity" layout="${windows-identity}" /&gt;
    &lt;parameter name="@baseDirectory" layout="${basedir}" /&gt;
    &lt;parameter name="@additionalInfo" layout="${mdc:item=AdditionalInfo}" /&gt;
    &lt;parameter name="@requestIdentifier" layout="" /&gt;
    &lt;parameter name="@log4jEvent" layout="&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&amp;lt;data xmlns:log4j=&amp;quot;http://jakarta.apache.org/log4j/&amp;quot; xmlns:nlog=&amp;quot;http://nlog-project.org/&amp;quot;&amp;gt;${log4jxmlevent:includeSourceInfo=true:includeCallSite=true:includeMdc=true:includeNdc=true}&amp;lt;/data&amp;gt;" /&gt;
    &lt;/target&gt;
  &lt;/targets&gt;
  &lt;rules&gt;
    &lt;logger name="*" minlevel="Trace" maxLevel="Fatal" writeTo="database" /&gt;
    &lt;logger name="*" minlevel="Error" maxLevel="Fatal" writeTo="mail" /&gt;
  &lt;/rules&gt;
  </code></pre>
  
  <p></p>
  
  <p>Any idea what may be causing this?</p>
  
  <p>Thanks</p>