title: Retrieving the COM class factory for remote component with CLSID
body: <p>I have written a console application that connects remotely to 8 servers, gets all IIS application pool names and status, and writes them to a SQL database.  7 of the servers work without an issue.  However, I have one server that I am getting an error on.  Below are the details:</p>
  
  <pre><code>    Unhandled Exception: System.UnauthorizedAccessException: Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344}
   from machine failed due to the following error: 80070005
     at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor,  Boolean&amp;bNeedSecurityCheck)
     at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
     at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
     at System.Activator.CreateInstance(Type type, Boolean nonPublic)
     at Microsoft.Web.Administration.ConfigurationManager.CreateAdminManager[TClass,TInterface](WebConfigurationMap webConfigMap, Boolean isAdminConfig)
     at Microsoft.Web.Administration.ConfigurationManager.CreateConfiguration(WebConfigurationMap configMap, String configPathToEdit, Boolean isAdminConfig)
     at Microsoft.Web.Administration.ConfigurationManager.GetConfiguration(StringrawConfigurationPath, String cacheKey, Boolean isAdminConfig)
     at Microsoft.Web.Administration.ConfigurationManager.GetApplicationHostConfiguration()
     at Microsoft.Web.Administration.ServerManager.get_ApplicationPoolsSection()
     at Microsoft.Web.Administration.ServerManager.get_ApplicationPools()
     at II7AppPools.Program.Main(String[] args)
  </code></pre>
  
  <p>I have seen several forums that say to recompile as x86 instead of AnyCPU.  I have done this and yet I am still getting this error.  Has anyone received this error for anything other than the AnyCPU issue?  Could it be a permission issue and, if so, permission to what?  The user running the script is an admin on all 8 servers.</p>