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

2

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

I've Searched for the entry in Registry I can Find Assembly with {0A80A563-28AE-11D3-9CD6-00C04F8B8EF1} at HKLM\Software\Classes\Wow6432Node\CLSID{0A80A563-28AE-11D3-9CD6-00C04F8B8EF1}\InProcServer32

I've Created Application By using embedded interop types it is working fine in the Local Machine but when i deploy it to another Server it gives the mentioned Error.

i am getting an mentioned error at following line of code

XYZ.IApplication Sr = new Application();

i have added reference to XYZ.tlb which is in C++ to 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)
c++
c#-4.0
iis-7
interop
web-deployment
asked on Stack Overflow May 17, 2013 by Kuldeep Vasani • edited May 17, 2013 by Kuldeep Vasani

3 Answers

3

I received the same error below.

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

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

regsvr32 {yourdllpath}\{yourdllfilename}
answered on Stack Overflow May 6, 2014 by Ryan Gates
2

It was an Issue due to Permission. IIS_User was not having permission to Access to Create Instance.

Updated Administrator Credential to App Pool and Problem was resolved.

answered on Stack Overflow May 30, 2013 by Kuldeep Vasani
0

This can also happen if you're running the Command DOS prompt, without Administrator rights.

Click START -> CMD -> Right click the Command option shown -> RUN AS ADMINISTRATOR -> go to your DLL location or better still place it in c:\windows\system32 or \sysWOW64 -> regsvr32 .\yourdll.dll

answered on Stack Overflow May 9, 2019 by Fandango68

User contributions licensed under CC BY-SA 3.0