title: Cannot open log for source {0} on Windows 2003 Server
body: <p>I am having a huge problem with the eventlog on my server. Right let me first of all explain the setup.</p>
  
  <ul>
  <li>I have a domain setup with 2 computers</li>
  <li>One computer is running IIS the other is a workstation. The IIS is running Win2k3 the workstation Win XP.</li>
  <li>The IIS computer is hosting a website which uses Windows Impersonation and tries to log an entry to the eventlog for a custom log file called <strong>MyApp</strong> and a custom event source <strong>MySource</strong></li>
  <li>I have a domain user called MyUser who is just a member of Domain Users.</li>
  <li>Single Sign On is working 100% because I can write out the logged in user to the page fine.</li>
  </ul>
  
  <p>When I visit the IIS page from the workstation I get one of the following messages (sometimes I get the first sometimes the second)</p>
  
  <pre><code>1) The handle is invalid
  2) Cannot open log for source 'MySource'. You may not have write access.
  </code></pre>
  
  <p>So to try and fix this I have tried all of the following:</p>
  
  <p>Granted the Everyone user FullControl to C:\windows\system32\config\MyApp.evt file</p>
  
  <p>Granted the everyone user FullControl to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog</p>
  
  <p>In the key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog\MyApp\CustomSD I appended the following string (A;;0x0002;;;AU), (the reason for this can be read here <a href="http://fgheysels.blogspot.com/2008/01/cannot-open-log-for-source-0-on-windows.html" rel="nofollow noreferrer">http://fgheysels.blogspot.com/2008/01/cannot-open-log-for-source-0-on-windows.html</a>)</p>
  
  <p>I am now totally out of ideas of how to fix this. Has anyone else come across this and have you tried anything else.</p>