IIS rest application access denied for COM+ communication


I created a REST application to IIS in C# which is using an application as a reference (COM+). This application is running in administrator privilage (run as administrator) and my REST application is running on IIS.

If I try to use the REST application I always get an error message:

ERRORRetrieving the COM class factory for component with CLSID {50F8C6E6-ED30-11D4-8D25-00010211E6C5} failed due to the following error: 80070005 Access is denied. (0x80070005 (E_ACCESSDENIED)).

If I change the Identity on application pool for a local user who has a membership on Administrators group then I get this message:

ERRORUnable to cast COM object of type 'MyService.ExampleClass' to interface type 'MyService.ICoAppTransport'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{50F8C6E4-ED30-11D4-8D25-00010211E6C5}' failed due to the following error: The object invoked has disconnected from its clients. (0x80010108 (RPC_E_DISCONNECTED)).

I have checked lots of post here but I can't find the solution. Could anybody help on this please?

asked on Stack Overflow Jan 29, 2021 by Zaosz

1 Answer


Try to re-register the DLL file with "regsvr32" to register the COM classes it supports, or the "bit-ness"(32/64-bit) of your EXE.

set application pool enable 32 bit to "True"

set application pool identity to the "local system" or custom user which has enough permission to access it.

Go to Component Service » Computers » My Computer » DCOM Config » check for a component you are using option and select tab Security. Here you will get the options for Launch and Activation Permission » select Customize and click on edit and then add IIS_IUSRS, IUSR, NETWORK SERVICE with full access.

answered on Stack Overflow Feb 1, 2021 by Jalpa Panchal

User contributions licensed under CC BY-SA 3.0