NUnit fails with "Inaccessible logs: Security"
<p>I'm relocating a build service from an ancient Windows XP server to Windows Server 2K12 R2, and now I'm stuck with what appears to be a permission issue:</p>

<p>During the "integration test" step of my build, NUnit fails:</p>

<pre><code>Errors and Failures:
1) SetUp Error : Hidden.UAC.Service.IntegrationTest.TestSetUp
   SetUp : System.Security.SecurityException : The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.
   at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate)
   at System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate)
   at Hidden.Cornerstone.Common.ApplicationManager.LogException(Exception e) in e:\Builder\TeamCity\buildAgent\work\9dbde7d05f17a8e5\Hidden.Cornerstone\Hidden.Cornerstone.Common\ApplicationManager.cs:line 99
   at Hidden.Cornerstone.Common.ApplicationManager.Initialize() in e:\Builder\TeamCity\buildAgent\work\9dbde7d05f17a8e5\Hidden.Cornerstone\Hidden.Cornerstone.Common\ApplicationManager.cs:line 91
   at Hidden.UAC.Service.IntegrationTest.TestSetUp.Init() in e:\Builder\TeamCity\buildAgent\work\9dbde7d05f17a8e5\Hidden.UAC\Hidden.UAC.Service.Impl.IntegrationTest\TestSetUp.cs:line 22
</code></pre>

<p>The build agent is running as the user <em>BuildSrvService</em>. I'm using TeamCity Professional 9.1.7 and NUnit 2.6.4 on a Windows Server 2012 R2 Datacenter server.</p>

<p>I'm assuming the solution here is to somehow grant the proper permissions on the event log to the user running the build agent, but I need a little help here :-)</p>