System.Runtime.InteropServices.COMException(0x80080005):检索COM类工厂具有CLSID组件 [英] System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID

查看:786
本文介绍了System.Runtime.InteropServices.COMException(0x80080005):检索COM类工厂具有CLSID组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用data替换微软Word MERGEFIELDS从SQL Server在一个简单的asp.net C#应用程序,并在本地工作正常,但是当我发布的往往的我得到以下内容:

I am replacing MS Word MergeFields with data from SQL Server in a simple asp.net c# application and it works fine locally but when i publish it often i get the following:

System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {00020906-0000-0000-C000-000000000046} failed due to the following error: 80080005.

我试图让这两个 IIS_IUSRS NETWORK SERVICE 完全访问权限,并设置身份互动的DCOM配置,但它并没有解决任何事情。

I tried giving both IIS_IUSRS and NETWORK SERVICE full access, and also set the identity to interactive in the DCOM config but it didn't fix anything.

推荐答案

有关讨厌的权限从做你所期望的,(我已经在过去遇到过)阻止你。有时候,我不得不改变我的DCOM / COM +权限对象了。在为您的项目DCOM配置标签屏幕,在安全性,确保两个启动和激活和访问已自定义为明确包括要允许的用户帐户。

For nasty permissions stopping you from doing what you expect, (I've encountered in the past too). Sometimes I've had to change my DCOM/COM+ permissions to an object too. At the DCOM Config tab screen for your project, under security, make sure BOTH "Launch and Activation" and "Access" have been customized to explicitly include the user account you intend to allow.

现在,还有一件事 - 只是为了排除所有其他人。我甚至已经走了的程度(仅用于测试/确认)是,标识选项卡上,您可以选择交互式用户,启动用户或此用户。我会放你知道有权限(确保您的账号也是在启动和激活......和访问权限之前的选项卡上),你的实际帐户。并且还进入/确认您的密码。

Now, one more thing -- just to rule out all others. I've even gone the extent (for testing / confirmation only) is that on the "Identity" tab, you can select the "Interactive User", "Launching User" or "This User". I would put in your actual account that you KNOW has permissions (ensure your account is also in the launch and activation... and access permissions on previous tab). And also to enter/confirm your password.

如果仍然失败,那么我会尝试添加管理员帐户的权限,并尝试......只是,是的,基于用户及其权限的目的。一旦确认,你可以扩展它回来,甚至创造一些简化的受限制的用户是谁的主要目的是运行此实用程序,而这个新的用户有足够的权限这样做。

If that still fails, then I would try adding the ADMIN account for permissions and try that... just for purposes of yes, its permissions based on a user. Once confirmed, you can scale it back, and even create some simplified restricted user who's primary purpose is to run this utility, and this new user has its adequate permissions to do so.

一旦做到这一点,你要善于去。

Once that is done, you should be good to go.

现在,这么说,我碰到的另一个古怪的事情,它已经有一段时间,所以它可能不会是一个问题了。每隔一段时间,在特定的窗口的更新,功能也只是停止工作。不过,如果我所做的就是返回到用户维护,不要更改帐户密码(哪怕只是保持它相同的原始密码),并保存它,然后去回到DCOM和输入/再确认保存它有太多,都成了再正常工作。

Now, that said, I've run into another flakey thing and its been a while, so it may not be an issue any more. Periodically, during certain "Windows" updates, the functionality would just stop working. However, if all I did was go back into user maintenance, do change password for the account (even if just keeping it the same original password) and saving it, then going back into DCOM and enter/re-confirm saving it there too, all became functional again.

这篇关于System.Runtime.InteropServices.COMException(0x80080005):检索COM类工厂具有CLSID组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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