最近,把一个网站部署到另一个服务器上,网站中一个功能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. op论坛,分支

    http://www.arm9home.net/thread.php?fid=68 http://www.openwrt.org.cn/bbs/forum.php https://dev.openwr ...

  2. 面向中国 Azure 开发者发布开源解决方案指南

     发布于 2014-05-23 作者 刘 天栋 Azure 是一个开放.灵活的云平台,可支持大量且不断增长的开源应用程序.框架和语言.微软及微软开放技术通过与全球及中国本地的开源社区不懈地合作,将 ...

  3. XSS跨站脚本攻击在Java开发中防范的方法

    1. 防堵跨站漏洞,阻止攻击者利用在被攻击网站上发布跨站攻击语句不可以信任用户提交的任何内容,首先代码里对用户输入的地方和变量都需要仔细检查长度和对”<”,”>”,”;”,”’”等字符做过 ...

  4. the private key for is not installed on this mac

    the private key for is not installed on this mac 如果提交 时出现这个问题, 有可能是 keychain重复了, 1:要去keychain中把旧的删除, ...

  5. zoj 3805 Machine

    Machine Time Limit: 2 Seconds      Memory Limit: 65536 KB In a typical assembly line, machines are c ...

  6. HDU-1233 还是畅通工程 (prim 算法求最小生成树)

    prim 算法求最小生成树 还是畅通工程 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Oth ...

  7. logstash快速入门 (这篇文章很不错 ) | 两种方式往logstash传输数据实例:Apache 日志(从文件获取)、Syslog方式

    原文地址:http://www.2cto.com/os/201411/352015.html 原文地址:http://logstash.net/docs/1.4.2/tutorials/getting ...

  8. 黑马程序员_<<GUI(图形用户界面)--------1>>

    --------------------ASP.Net+Android+IOS开发..Net培训.期待与您交流! -------------------- 1.  GUI图形用户界面 1.简述 Gra ...

  9. 解决Qt5使用SSL的“qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method”错误

    在使用Qt的网络组件连接某些服务器时, 会提示"qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method"的错误 ...

  10. CSS+JS下拉菜单和纯CSS下拉菜单

    下拉菜单 (思路:先把二级定位到屏幕外,鼠标悬停重新定位回来:另一个就是ul浮动,li也浮动) 下拉菜单的一般思路就是把子导航嵌套在无序列表中,把列表定位到屏幕之外,当鼠标悬停在其父列表项上时,重新定 ...