80040111 ClassFactory cannot provide the requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE))

Retrieving the COM class factory for a component with CLSID {0A80A563-28AE-11D3-9CD6-00C04F8B8EF1} failed with the following error: 80040111 ClassFactory cannot provide requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILAB)

I searched the registry entry, I can find the assembly with {0A80A563-28AE-11D3-9CD6-00C04F8B8EF1} in HKLM \ Software \ Classes \ Wow6432Node \ CLSID {0A80A563-28AE-11D3-9CD6-00C04F8B8EF1ver} \ In

I have created an application. Using the built-in interop types, it works fine on the local machine, but when I deploy it to another server, it gives the specified error.

I am getting the above error on the following line of code

XYZ.IApplication Sr = new Application();

      

I have added a link to XYZ.tlb which is in C ++ for my C # project.

here is the stack trace

   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)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)

      

+2


source to share


3 answers


It was a permission issue. IIS_User did not have permission to access Create Instance.



Updated admin credentials for the application pool and resolved the issue.

+2


source


I got the same error below.

System.Runtime.InteropServices.COMException (0x80040111): Retrieving COM class factory for component with CLSID {0B92B777-B6AD-435C-B9FD-804878C36E55} failed due to the following error: 80040111 ClassFactory cannot provide requested class (Exception from HRES : 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).



In my case, re-registering it multiple times with the following command resolved the issue.

regsvr32 {yourdllpath}\{yourdllfilename}

      

+2


source


This can also happen if you run a DOS command prompt without administrator rights .

Press START -> CMD -> Right click on the option shown Command -> RUN AS ADMINISTRATOR -> navigate to the DLL folder, or better yet, place it in c: \ windows \ system32 or \ sysWOW64 -> regsvr32. \ Yourdll.dll

0


source







All Articles