从.Net Framework 3.5无法调用vb6 dll。由于以下错误,无法为具有clsid的组件检索COM类工厂:800aea5f [英] From .Net Framework 3.5 can't call vb6 dll. Retrieving the COM class factory for component with clsid failed due to the following error: 800aea5f
问题描述
我尝试从 .Net Framework 3.5 Dll库项目中识别Com dll(在VB6中开发),但出现以下错误:
I try to istanciate a Com dll(developped in VB6) from a ".Net Framework 3.5 Dll Library Project" and I get the following error:
为带有CLSID {...}的组件检索COM类工厂失败,原因是以下错误:800aea5f。
Retrieving the COM class factory for component with CLSID {...} failed due to the following error: 800aea5f.
在同一台计算机上,我尝试从VBScript识别COM dll,并且工作正常。
另外,我尝试注销并重新注册dll却没有良好的结果。
On the same machine I try to istanciate the COM dll from a VBScript and it's work fine. In addition I tried to unregister and re-register the dll without good results.
现在从Windows应用程序.net 3.5可以识别COM dll,但是
Now from a windows applcation .net 3.5 I can istanciate the COM dll but it's impossible to do from a web application (also with and without impersonate configuration into web.config)
DCOM属性:
常规->身份验证=默认
安全性->所有属性=默认
身份->身份=启动者用户
DCOM properties: General --> Authentication = Default Security --> All properties = Default Identity --> Identity = The launcher user
有任何建议吗?
推荐答案
错误是指向用户权限的链接。
The error is link to User Permissions.
调用的树是:WebApplication-> WcfService -> .Net 3.5 dll-> COM dll
The call's tree is: WebApplication --> WcfService --> .Net 3.5 dll --> COM dll
即使我在WebApplication web.config上设置了本地用户模拟,WcfService也会使用与VirtualDirectory的应用程序池关联的用户
Even if I set a local user impersonation on WebApplication web.config, WcfService use the user associate to VirtualDirectory's Application Pool that is "NETWORK SERVICE".
只需将ApplicationPool的默认用户更改为LocalSystem,对COM的调用就可以正常工作
Just I change ApplicationPool's Default User to LocalSystem the call to COM work fine
这篇关于从.Net Framework 3.5无法调用vb6 dll。由于以下错误,无法为具有clsid的组件检索COM类工厂:800aea5f的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!