I have a problem with a C# .NET command line application, which main idea is to get data from other program using COM object. It works fine when being executed manually or when running as a child process inside Node.js server, however when the entire project is installed as a windows service the C# app responds with following error:
System.UnauthorizedAccessException: Creating an instance of the COM component with CLSID {D64DB4A9-3B26-4D2B-B556-9DA433C54175} from the IClassFactory failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
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 CurrentCamUri.Program.Main(String[] args)
From what I read here and on similar threads mainly focused on Office applications, I should see the COM object inside "DCOM Config" tab in dcomcnfg /32
, however I can't find anything with the related CLSID. I tried running dcomcnfg
without the '/32' suffix but also with no success. The main application with which I need to get data from is 32-bit (let's call it mother app).
Any suggestion how can I approach that problem? I would be really grateful. Thanks!