title: Problem when trying to use EventLog.SourceExists method in .NET
body: <p>I am trying to use eventlogs in my application using C#, so I added the following code</p>
  
  <pre><code>if (!EventLog.SourceExists("SomeName"))
  EventLog.CreateEventSource("SomeName", "Application");
  </code></pre>
  
  <p>The EventLog.SourceExists causes SecurityException that says<br>
  <strong>"The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security."</strong></p>
  
  <p>I am running as administrator in Windows 7.</p>
  
  <p>Any help would be appriciated.</p>