检索COM类工厂CLSID组件的错误:8000401a(Retrieving the COM cla

2019-07-28 23:08发布

从去年这么多次我正在下面error.As我使用的是Microsoft Word中的dll创建进一步连接到邮件Word文件。

Server Error in '/' Application.
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 8000401a.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 8000401a.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x8000401a): Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 8000401a.]
   iPortal.user.sendRAMail.GetData(Object fileName) in XXX:512
   iPortal.user.sendRAMail.btnSend_Click(Object sender, EventArgs e) in XXX:1300
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +107
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3436


Version Information: Microsoft .NET Framework Version:2.0.50727.4216; ASP.NET Version:2.0.50727.4223 

任何人可以请建议我任何solution.As我也得到了一些解决方案,说我使用更改的话dll文件访问权限DCOMCNFG ,但仍然得到了一些时间它正常工作一样error.but ......所以我觉得该代码是不是一个问题。 而且how I will find which account is using my current application. (ex.Network服务,管理等)

Answer 1:

我找到了解决办法,

使用DCOMCNFG.EXE打开它,并转到组件服务 - > Computers->我的电脑> DCOM Config->检查Microsoft Office Word中的选项,并选择标签Security.Here你会得到启动和激活Permission-选项>选择自定义然后点击编辑和添加将运行在您的完全访问应用程序的用户。

这一切,这解决了我的问题跳,这将帮助。



Answer 2:

我的想法是摆脱Com的都在一起,如果我能找到一个更好的解决方案,我会用它

看一下这个

http://docx.codeplex.com/



Answer 3:

有一件事我在我的服务器上所做的就是打开Microsoft Word在机器上,这似乎导致错误走开。



Answer 4:

您可以创建其他用户,然后使用密码和远程创造121.0.0.1和主要用户(环回RPC !!!)然后新的用户diconnect,你将有交互式用户



文章来源: Retrieving the COM class factory for component with CLSID Error: 8000401a