80040111 ClassFactory不能提供请求的类(来自HRESULT的异常:0x80040111(CLASS_E_CLASSNOTAVAILABLE)) [英] 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE))
问题描述
检索COM类工厂具有CLSID组件{0A80A563-28AE-11D3-9CD6-00C04F8B8EF1}失败,原因是以下错误:80040111的ClassFactory不能提供所请求的类(从HRESULT异常:0x80040111(CLASS_E_CLASSNOTAVAILABLE))
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))
我搜索过注册表项,我可以在HKLM\Software\Classes\Wow6432Node\CLSID与{0A80A563-28AE-11D3-9CD6-00C04F8B8EF1}查找大会{0A80A563-28AE-11D3-9CD6-00C04F8B8EF1} \InProcServer32
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();
我已经添加了对我的C#项目的C ++中的XYZ.tlb的引用。
i have added reference to XYZ.tlb which is in C++ to my C# project.
这里是堆栈跟踪
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)
推荐答案
这是一个由于权限的问题。 IIS_User不是有访问权限的创建实例。
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.
这篇关于80040111 ClassFactory不能提供请求的类(来自HRESULT的异常:0x80040111(CLASS_E_CLASSNOTAVAILABLE))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!