'Creating instance of the COM component with CLSID {..} from the IClassFactory failed due to the following error 800a0005 CTL_E_ILLEGALFUNCTIONCALL
My web API (c# .net 4.7..), hosted on IIS (Windows 10), in order to run properly, requires a piece of software installed on the PC where the IIS is. This piece of software is written in VB and it needs to be running in order for the web-API to start up properly. The web API is referencing some VB functionality via interop and COM registered dlls.
In Task-manager, i observe that IIS\worker process instead of referencing my running VB6 process, starts a new instance of the VB software (but not properly - and some variables are not loaded in this second instance - i assume this) hence i get the following error:
Creating an instance of the COM component with CLSID {...} from the IClassFactory failed due to the following error: 800a0005 Exception from HRESULT: 0x800A0005 (CTL_E_ILLEGALFUNCTIONCALL).
I have configured IIS and the app pool identity and authentication so that IIS/worker process is starting as the same user as the VB software is run as (both elevated).
I am not sure on how to force the w3w worker process to see the already running VB exe and prevent it from running a new instance of it.
When I am developing in visual studio 2019, and the web API is run via IIS express, everything works fine.
Thank you
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
