最近,把一个网站部署到另一个服务器上,网站中一个功能word转pdf报下面错误:

在此附上解决方案:

方法1:配置Web.Config文件,在每次请求时模拟本地系统的账户。

    具体操作:在Web.Config文件中添加如下节点:

      <identity impersonate="true" userName="accountname" password="password" />
      其中:userName是要模拟的本地账号,password是该账号的密码。

方法2:在“DCOM配置”中,为IIS账号配置操作Word(其他Office对象也一样)的权限。

具体操作:“组件服务(Component Service)”->计算机(Computers)->我的电脑(My Computer)->DCOM配置(DCOM Config)->Microsoft Office Word 97 - 2003 文档,右击“Microsoft           Office Word 97 - 2003 文档”,选择“属性”进行一下两步操作:

     (1)在【标识(Identity)】选项卡中选中“交互式用户(The interactive user)”.

     (2)在【安全(Security)】选项卡中,分别给前两个组(启动和激活权限,访问权限)选择“自定义(customer)”,然后点“编辑”,在弹出的界面中添加IIS账号(Server版的操作系统一般为NETWORK             SERVICES,其他系统(XP)可能会是ASP.NET),并在下面的权限框中,给该用户分配所有权限。

注意:如果在组建服务中找不到Microsoft Office Word 97 - 2003 文档,主要是64位系统的问题,Office是32位的组件,所以在正常的系统组件服务里是看不到的 可以通过在运行里面输入 comexp.msc -32 来打开32位的组件服务,在里就能看到了)

方法3:为ASP.NET站点应用池分配本地账号

具体操作:在IIS中,为ASP.NET站点创建新的应用程序池,再改应用程序池属性的【标识(identity)】选项卡中,为“预定义账户”选择“本地系统(LocalSystem)”。

      如果是IIS7.0中,则按以下步骤操作:为ASP.NET站点创建新的应用程序池。选中该应用程序池,高级设置->进程模式—>标识:选择localSystem。

转载自:http://blog.csdn.net/phoenix_17th/article/details/5630677

http://stackoverflow.com/questions/13890906/retrieving-the-com-class-factory-for-component-with-clsid-000209ff-0000-0000-c0

错误:Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问。的更多相关文章

  1. Retrieving the COM class factory for component with CLSID XX failed due to the following error: 80070005 拒绝访问。

    环境及异常信息说明 环境说明: Win2008 R2 企业版 x64 .IIS 7.0 功能说明:服务端操作Excel,(上传Excel到服务器,并在服务器端读取Excel中的数据) 异常信息:Ret ...

  2. Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问

    异常信息:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046 ...

  3. Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问。

    这几天在写一个导出word的功能,使用 Microsoft.Vbe.Interop.dll和Office.dll 在本地都可以正常运行,但是上传到服务器后就报错,如下图: 对于此问题,也在网上查了一些 ...

  4. C# Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005

    环境说明: Win2008 R2(中文版) x64 .IIS 7.0 功能说明:上传Excel到服务器,并在服务器端读取Excel中的数据: 异常信息:Retrieving the COM class ...

  5. Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

    Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} fai ...

  6. 【Excel】Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046}:

    [Excel]Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-0000000000 ...

  7. C# - (0x80040154): Retrieving the COM class factory for component with CLSID {877AA945-1CB2-411C-ACD7-C70B1F9E2E32} failed

    1. Exeption Error: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM clas ...

  8. 使用Gird++打印出现“Retrieving the COM class factory for component with CLSID”的解决办法

    我们的接口需要返回一个gird++生成PDF文件的二进制数据,在本地测试都很好,发布到服务器上一直出现“Retrieving the COM class factory for component w ...

  9. 异常:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

    异常:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} ...

随机推荐

  1. statspack系列6

    原文:http://jonathanlewis.wordpress.com/2006/12/27/analysing-statspack-6/ 作者:Jonathan Lewis 下面是一段时间以前网 ...

  2. win7重装系统的配置步骤

    0. 关闭休眠功能,在开始菜单的运行里输入powercfg -h off 指令,关闭休眠,此文件实际大小和物理内存是一样的,大约可以为C盘释放1-3G的空间. 1. 在Win7桌面上显示“我的电脑” ...

  3. xPath Helper

    整个抓取使用了 xpath.正则表达式.消息中间件.多线程调度框架(参考).xpath 是一种结构化网页元素选择器,支持列表和单节点数据获取,他的好处可以支持规整网页数据抓取.我们使用的是google ...

  4. 【单页应用】view与model相关梳理(转载)

    [单页应用]view与model相关梳理 前情回顾 根据之前的学习,我们形成了一个view与一个messageCenterview这块来说又内建了一套mvc的东西,我们这里来理一下首先View一层由三 ...

  5. Bzoj 2243: [SDOI2011]染色 树链剖分,LCT,动态树

    2243: [SDOI2011]染色 Time Limit: 20 Sec  Memory Limit: 512 MBSubmit: 5020  Solved: 1872[Submit][Status ...

  6. Response.Write,Page.RegisterClientScriptBlock和Page.RegisterStartupScript的区别

    Response.Write("<script>");输出在文件头部,一打开就执行. RegisterClientScriptBlock一般返回的是客户端函数的包装, ...

  7. HDU 1568 Fibonacci 数学= = 开篇

    题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=1568 分析:一道数学题 找出斐波那契数列的通项公式,再利用对数的性质就可得到前几位的数 斐波那契通项公 ...

  8. 利用Dnspod api批量更新添加DNS解析【python脚本】 - 推酷

    利用Dnspod api批量更新添加DNS解析[python脚本] - 推酷 undefined

  9. Linux下常用I/O模型

    Linux异步I/O是Linux内核中提供的一个相当新的增强.它是2.6版本内核的一个标准特性,异步非阻塞I/O背后的基本思想是允许进程发起很多I/O操作,而不用阻塞或等待任何操作完成.稍后或在接收到 ...

  10. 常用js效果:选项卡切换

    js选项卡,很多网站都会用到,我这里用jquery给整了一个简单但是却很实用的js选项卡,废话不多说,直接上代码: <style> .txtadsblk01{ width:200px;} ...