在WCF服务中访问COM时出错 [英] Error while accessing COM in WCF service

查看:67
本文介绍了在WCF服务中访问COM时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我已经开发了一种WCF服务,其中一种服务方法是使用COM组件,但是当此方法尝试创建COM实例时,它将返回以下错误:

"Creating an instance of the COM component with CLSID {D64DB4A9-3B26-4D2B-B556-9DA433C54175} from the IClassFactory failed due to the following error: 80070005"

我需要设置什么权限以及在哪里?

谢谢

Hello,

I have developed one WCF service and one of the method of service is using COM component but when this method tries to create instance of COM then it returns below error:

"Creating an instance of the COM component with CLSID {D64DB4A9-3B26-4D2B-B556-9DA433C54175} from the IClassFactory failed due to the following error: 80070005"

what permissions I need to set and where?

Thanks

推荐答案

我在Google上找到了它:

您可能需要为IIS中像apppool一样运行的Windows用户设置com组件的启动权限.您可以通过运行dcomcnfg
来做到这一点
还有...

并设置文件权限,以便用户可以读取COM dll文件.

还要检查COM的注册,以查看COM服务器是否支持在MTA线程中被调用.大多数COM服务器都需要STA,它不适合由Web服务创建的MTA线程.
I found this with google:

You may need to set launch permission to the com component for the windows user the apppool is running as in IIS. You can do it by running: dcomcnfg

and...

And set file permissions so the user can read the COM dll file.

Also check the COM''s registration to see if the COM server supports being called in an MTA thread. Most COM servers requires STA which is not suitable for the MTA threads created by web services.


尝试DCOM配置.
http://forums.asp.net/t/1239867.aspx/1 [ ^ ]
Try DCOM config.
http://forums.asp.net/t/1239867.aspx/1[^]


这篇关于在WCF服务中访问COM时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆