当前位置: 代码迷 >> ASP.NET >> 服务器调用word出错了,前几天还好好的。怎么回事呀
  详细解决方案

服务器调用word出错了,前几天还好好的。怎么回事呀

热度:6185   发布时间:2013-02-25 00:00:00.0
服务器调用word出错了,前几天还好好的。咋回事呀?
Server Error in '/' Application.
--------------------------------------------------------------------------------

Creating an instance of the COM component with CLSID {00020906-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 8001010a. 
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: Creating an instance of the COM component with CLSID {00020906-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 8001010a.

Source Error: 


Line 102: object oTemplate = templateFile;
Line 103:
Line 104: Word.Document WordDoc = new Word.Document();
Line 105: //try
Line 106: //{
 

————————————————————————————————————————
救救我呀,这是什么问题呀,前几天在服务器上还好好的,现在就成这样了。

查了半天也没找到解决办法。

有朋友知道吗,十分感谢呀

------解决方案--------------------------------------------------------
检查DCOM操作权限,重新安装OFFICE
word效果不好,使用第三方控件
------解决方案--------------------------------------------------------
8001010a好像是com server忙

参考下面的讨论
http://forums.asp.net/p/1244688/2296465.aspx
------解决方案--------------------------------------------------------
应该是权限的问题

1.开始->运行,输入dcomcnfg.exe

2.打开组件服务器->计算机->我的电脑->DCOM配置;

3.找到Microsoft Office Excel或者Microsoft Office Word点击右键->属性

4.选择安全,将启动和激活权限、访问权限、配置权限全部选择自定义,之后编辑,添加everyone用户,给它所有的权限
  相关解决方案