COM例外 [英] COM Exception

查看:78
本文介绍了COM例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

我正在使用VB.net网络应用程序。我正在使用Interop.Excel.Application动态生成Excel工作簿。当创建新的Excel.Application实例时,我收到COM异常

。我也在DCOM Config中授予了访问权限。我怎样才能摆脱这个例外?



检索COM类工厂组件  CLSID {00024500-0000-0000-C000-000000000046}因 而失败错误: 80080005 服务器执行失败(例外来自 HRESULT:0x80080005(CO_E_SERVER_EXEC_FAILURE))。







请帮帮我。



提前致谢

Vanathi

解决方案

我有同样的错误 while  使用 运行中的 > on  IIS  7  5   on 我的胜利 7  64位机器。我能够 解决它 添加网络 user (IUSR)  CorelDRAW DCOM组件授予本地启动激活权限。我还 更改身份标签下的设置 ' 启动用户'  ' 交互式用户'

这篇文章很有帮助,但 win 7 。 http://blog.crowe.co.nz/archive/2006/03/02/589.aspx


1)以管理员身份运行在其上创建com异常的已考虑的应用程序(例如您的应用程序或VS)



2)未修复,请检查你的DCOM设置



1)运行dcomcnfg打开组件服务

2)展开组件服务 - >电脑 - >我的电脑 - > DCOM配置

3)找到Microsoft Excel应用程序。

4)打开属性对话框的权利

5)点击在安全选项卡上,

6)启动和激活权限,配置权限,选择了自定义

7)他们编辑然后单击添加的已考虑的应用程序它,并添加了所有权限...



3)未修复,通过regsvr32注册excel或重新安装VSTO



建议:

使用Office Open XML创建文件而不是自动化。有几个库可以帮助您构建Excel文件。我个人使用 EPPlus 并认为它相当不错。


运行程序dcomcnfg -32。 (如果它在64位下运行,你就找不到单词和excel组件。

转到控制台根/组件服务/计算机/我的电脑/ DCOM配置/查找Microsoft Word和Excel并选择属性。

转到安全性并选择配置权限下的自定义。(如果需要,您可能也想更改其他权限,但我不需要)添加IIS_IUSRS并提供完全控制。



现在转到身份并选择交互式用户。


Hi
I'm working on a VB.net web app. I'm generating an Excel workbook dynamically using Interop.Excel.Application. I'm getting a COM Exception
when new instance of Excel.Application is created. I've given access permissions in DCOM Config also. How Can I get rid of this exception?

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).




Please help me.

Thanks in advance,
Vanathi

解决方案

I had the same error while using the CorelDRAW .tkl in a web app running on IIS 7.5 on my Win 7 64bit machine. I was able to solve it by adding the web user (IUSR) to the CorelDRAW DCOM component and granting local launch and activation permissions. I also had to change the setting under the Identity tab from 'The launching user' to 'The interactive user'.

This article was helpful, but was not written for win 7. http://blog.crowe.co.nz/archive/2006/03/02/589.aspx


1) Run the considered app which the com exception was created on it(e.g your app or VS) as administrator

2) NOT Fixed, check your DCOM settings

1) Run dcomcnfg open Component Services
2) Expand Component Services "->" Computer "->" My Computer "->" the DCOM configuration "
3) Find the "Microsoft Excel application."
4) Right to open the Properties dialog box
5) Click on the "Security" tab,
6) "Launch and Activation Permissions, configure permissions, have opted for a custom
7) Their editing and then click the considered app added to it, and added all the permissions ...

3) Not Fixed, register the excel by regsvr32 or reinstall VSTO

Suggestion:
Use Office Open XML to create your files instead of automation. There are several libraries out there that will help you build Excel files. I personally use EPPlus and think it's pretty decent.


Run program "dcomcnfg -32". ( You cant find the word and excel components if it runs under 64bit)
Go to "Console Root/Component Services/Computer/My Computer/DCOM Config/" Look up Microsoft Word and Excel and choose properties.
Go to Security and select "Customize" under "Configuration Permissions. (If needed you might want to change the other permissions as well, but I didn't need to) Add "IIS_IUSRS" and give it "Full Control".

Now go to "Identity" and select "The interactive user".


这篇关于COM例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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