Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} from machine [SERVERNAME] failed due to the following error: 80070005 [SERVERNAME]

Scott E 1 Reputation point
2022-09-14T14:56:00.37+00:00

We have added a Windows Server 2019 to our network to host websites. We have tooling that uses Microsoft.Web.Administration to manage IIS however it cannot connect to the new server. I have searched a lot and found people with similar problems but have not yet found any solution that works. Any help would be greatly appreciated.

We get the following error everytime our tools try to connect to the server:

Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} from machine [SERVERNAME] failed due to the following error: 80070005 [SERVERNAME].
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at Microsoft.Web.Administration.ConfigurationManager.CreateAdminManagerTClass,TInterface at Microsoft.Web.Administration.ConfigurationManager.CreateWritableAdminManager(WebConfigurationMap webConfigMap, String configPathToEdit, Boolean isAdminConfig, Boolean isRedirectionConfig) at Microsoft.Web.Administration.ConfigurationManager.CreateConfiguration(WebConfigurationMap configMap, String configPathToEdit, Boolean isAdminConfig, Boolean isRedirectionConfig) at Microsoft.Web.Administration.ConfigurationManager.GetConfiguration(String rawConfigurationPath, String cacheKey, Boolean isAdminConfig, Boolean isRedirectionConfig) at Microsoft.Web.Administration.ConfigurationManager.GetApplicationHostConfiguration() at Microsoft.Web.Administration.ServerManager.SitesSectionCreator() at Microsoft.Web.Administration.Lazy.InitializeT at Microsoft.Web.Administration.ServerManager.get_SitesSection() at Microsoft.Web.Administration.ServerManager.SitesCollectionCreator() at Microsoft.Web.Administration.Lazy.InitializeT at Microsoft.Web.Administration.ServerManager.get_Sites()

Internet Information Services
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,084 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Wu-MSFT 7,036 Reputation points Microsoft Vendor
    2022-09-16T03:14:16.887+00:00

    @Scott E

    It could be various reasons for this error, like permissions or misconfiguration of application pool, etc. Here, we have mentioned some settings that may help to fix your issue.

    1. Ensure that your application pool identity has the proper permission for the website root folder. Also, be sure about your application pool identity user(IIS Apppool\<app pool name>) before applying for permission. If the issue doesn't fix, you can go for the other options.
    2. You may be running on a windows server with 64 bit OS. try to enable 32-bit applications for the Application Pool. Go to Websites >Select the application pool your 32-bit application will run under > Click Advanced setting > Set Enable 32-bit Applications to True.
    3. Provide read/write permission to the website application pool identity to the C:\Windows\Temp folder.

    Besides, if you need to remote administration the IIS, please ensure you have set the IIS management service correctly: delegating-iis-administration-to-domain-users-non-administrators.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. MotoX80 31,566 Reputation points
    2022-09-16T14:01:26.517+00:00

    This make me think the issue has to be with a security change

    Do you see any logon failures in the security eventlog on the destination server? And at the same time, do you see a successful logon for the app pool identity account when you try to connect?

    Have you reviewed the dcomcnfg access permissions?

    241952-image.png

    If you run the code that you posted interactively with an account that has admin access on the target server, is it able to connect?