title: Activator.CreateInstance Works in Web Service ONLY if User is Logged in Locally
body: <p>I have a WCF Service that impersonates a user and calls <code>Activator.CreateInstance</code> to create a COM Object:</p>
  
  <pre><code>if(impersonateValidUser(impersonatedUser,impersonatedUserDomain,impersonatedUserPassword))
      {
      try
      {
          obj = Activator.CreateInstance(Type.GetTypeFromProgID("Client.Application"));
      }
      catch { }
      undoImpersonation();
  }
  </code></pre>
  
  <p>When I am logged on to the server locally as <code>impersonatedUser</code>, all works as expected.  <code>Client.exe</code> exists as a process, as does <code>Viewer.exe</code>.  Both are created when I activate the COM Object.</p>
  
  <p>However, if I am NOT logged on locally as <code>impersonatedUser</code>, only <code>Client.exe</code> is created as a process, and I get the error:</p>
  
  <pre><code>The instruction at “&lt;address&gt;” referenced memory at "0x00000000". The memory could not be “read.”
  </code></pre>
  
  <p>My only guess is that the system doesn't allocate enough memory if the user is not otherwise logged on?  I have no other idea what the issue could possibly be.  Any suggestions?</p>
  
  <p>Thank you for any and all help!</p>