Can anyone shed some light on error I'm receiving when executing .net Console application. (System.Runtime.InteropServices.COMException (0x80040111)

0

I have a .net (framework version 4.5.1) console application that encounters the following error when it is executed:

       System.Runtime.InteropServices.COMException (0x80040111): Retrieving the COM class factory for component with CLSID {F374E943-076A-40B9-813E- 0FBFB823E638} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).
       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)

I have tried changing the Platform target to X86 based on other posts I've found similar to this but that has not worked for me. The .dll that is being referenced in my console application is Interop.MOVEitAPI.dll. Could the problem be from a mismatch in the version of the MOVEitAPI that is referenced in the console application and the version that is actually installed on the server the console app is running on ?

c#
.net
com
console-application
moveit
asked on Stack Overflow Mar 5, 2019 by Jason

1 Answer

0

On the machine that you are executing the program, make sure you have the original COM MOVEitAPI.dll that was used to build the program and make sure that DLL is registered. To register a DLL, run

regsvr32 MOVEitAPI.dll

as admin in command prompt.

answered on Stack Overflow Mar 5, 2019 by Henry Yu

User contributions licensed under CC BY-SA 3.0