检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件失败

shengyongwang 2013-09-09 03:35:24
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------

检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件失败,原因是出现以下错误: 80070005 拒绝访问。 (异常来自 HRESULT:0x80070005 (E_ACCESSDENIED))。
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.UnauthorizedAccessException: 检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件失败,原因是出现以下错误: 80070005 拒绝访问。 (异常来自 HRESULT:0x80070005 (E_ACCESSDENIED))。

ASP.NET 无权访问所请求的资源。请考虑对 ASP.NET 请求标识授予访问此资源的权限。ASP.NET 有一个在应用程序没有模拟时使用的基进程标识(通常,在 IIS 5 上为 {MACHINE}\ASPNET,在 IIS 6 和 IIS 7 上为网络服务,在 IIS 7.5 上为配置的应用程序池标识)。如果应用程序正在通过 <identity impersonate="true"/> 模拟,则标识将为匿名用户(通常为 IUSR_MACHINENAME)或经过身份验证的请求用户。

To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

源错误:


行 28: //}
行 29:
行 30: Microsoft.Office.Interop.Word.Application app = new Microsoft.Office.Interop.Word.Application();

在做word导出的时候遇到这个问题,在源码里面执行没有问题,但是部署到iis里面就出现了这个问题。
在网上查了很多解决办法,都没有解决。
请问大侠有没有其他的解决办法。
...全文
11931 20 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
夕阳丶晨曦 2015-11-06
  • 打赏
  • 举报
回复
啊啊啊、把word转pdf也遇到这个问题啊!!求怎么解决。。。
xcz23 2015-10-10
  • 打赏
  • 举报
回复
遇到了同样的问题,纠结了好久都没解决
慕容引刀 2015-06-08
  • 打赏
  • 举报
回复
遇到了同样的问题,请问楼主怎么解决的
牢头l 2015-04-27
  • 打赏
  • 举报
回复
遇到了同样的问题,请问楼主怎么解决的
蘿蔔 2014-05-27
  • 打赏
  • 举报
回复
引用 14 楼 shengyongwang 的回复:
没有解决,后来换另外一种方法解决了。
求解决方法。。。
zhoucongkk 2014-02-20
  • 打赏
  • 举报
回复
楼主怎么解决的,求指教
shengyongwang 2013-11-29
  • 打赏
  • 举报
回复
没有解决,后来换另外一种方法解决了。
qq624322991 2013-11-22
  • 打赏
  • 举报
回复
我的程序偶尔也会出现这个问题,搜索的时候看到了这个链接http://www.haogongju.net/art/2340268,,“原来Microsoft.Office.Interop.Word是用的最新的14.0.0.0,后来改为12.0.0.0,问题解决”,我改了一下,目前暂时好了,因为不是每次都会出现问题,所以我也不知道这样个算不算正确。现在回复算不算挖坟
by_封爱 2013-09-30
  • 打赏
  • 举报
回复
自从用了myxls组件之后 在也没遇到过这样的问题..
ljy_0423 2013-09-30
  • 打赏
  • 举报
回复
Com+/MDTC服务有没有启动起来,操作Office等组件还要在WEB.CONFGIG中配置用户的权限(会引起安全问题) <system.web> <identity impersonate="true" userName="administrator" password="xxxxxxx" /> </system.web>
jrl5365 2013-09-30
  • 打赏
  • 举报
回复
权限问题!
zi_wu_xian 2013-09-29
  • 打赏
  • 举报
回复
做word导出啊,你用服务器端自动化技术容易在服务器上产生office死进程,代价很大。
用第三方产品也不错,比方说PageOffice,百度一下
tan598121925 2013-09-09
  • 打赏
  • 举报
回复
引用 7 楼 shengyongwang 的回复:
按照 [quote=引用 1 楼 tan598121925 的回复:] http://blog.csdn.net/ououou123456789/article/details/6102036
按照您说的做了,这个问题解决了,又出现下面的问题了 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 因为配置类型不正确,系统无法开始服务器进程。请检查用户名和密码。 (Exception from HRESULT: 0x8000401A). 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 因为配置类型不正确,系统无法开始服务器进程。请检查用户名和密码。 (Exception from HRESULT: 0x8000401A). 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: [/quote] 试试这个
shengyongwang 2013-09-09
  • 打赏
  • 举报
回复
按照
引用 1 楼 tan598121925 的回复:
http://blog.csdn.net/ououou123456789/article/details/6102036
按照您说的做了,这个问题解决了,又出现下面的问题了 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 因为配置类型不正确,系统无法开始服务器进程。请检查用户名和密码。 (Exception from HRESULT: 0x8000401A). 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 因为配置类型不正确,系统无法开始服务器进程。请检查用户名和密码。 (Exception from HRESULT: 0x8000401A). 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:
真相重于对错 2013-09-09
  • 打赏
  • 举报
回复
引用 5 楼 shengyongwang 的回复:
[quote=引用 1 楼 tan598121925 的回复:] http://blog.csdn.net/ououou123456789/article/details/6102036
这些都试过,就是不行了。[/quote] 组件注册了没?
shengyongwang 2013-09-09
  • 打赏
  • 举报
回复
引用 1 楼 tan598121925 的回复:
http://blog.csdn.net/ououou123456789/article/details/6102036
这些都试过,就是不行了。
F15Eagle 2013-09-09
  • 打赏
  • 举报
回复
引用 3 楼 hdt 的回复:
[quote=引用 2 楼 hengwang007 的回复:] 权限不够,试试把ASP.NET和IUSER这类用户加入到Administrators组中。 方法:右击我的电脑--管理--系统管理--本地用户和组--右击“ASP.NET”--属性--隶属于--添加--输入“Administrators”--确定。
这么做,你的网站就等着被黑吧[/quote] 楼主谨慎处理,哈哈哈哈。。。
真相重于对错 2013-09-09
  • 打赏
  • 举报
回复
引用 2 楼 hengwang007 的回复:
权限不够,试试把ASP.NET和IUSER这类用户加入到Administrators组中。 方法:右击我的电脑--管理--系统管理--本地用户和组--右击“ASP.NET”--属性--隶属于--添加--输入“Administrators”--确定。
这么做,你的网站就等着被黑吧
F15Eagle 2013-09-09
  • 打赏
  • 举报
回复
权限不够,试试把ASP.NET和IUSER这类用户加入到Administrators组中。 方法:右击我的电脑--管理--系统管理--本地用户和组--右击“ASP.NET”--属性--隶属于--添加--输入“Administrators”--确定。

62,243

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧