IIS上的Word自动化 [英] Word automation on IIS

查看:80
本文介绍了IIS上的Word自动化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我创建了一个Web应用程序,使用Microsoft.Office.Interop.Word dll在其中生成ms-word文档.
该应用程序在Visual Studio中运行良好,但是当我尝试通过虚拟目录在IIS 5.0上运行时,它给出了以下错误-

由于以下错误,检索具有CLSID {000209FF-0000-0000-C000-000000000046}的组件的COM类工厂失败:80070005.

在我的应用程序中,我已经引用了Microsoft Word 12.0对象库,但是它以Microsoft.Office.Interop.Word dll的形式出现,该互操作dll只是实际单词COM dll的包装.
但我必须注册实际的单词COM dll.所以我的问题是找到-

1)原始单词dll(COM)的路径
2)如何使用regsvr32或在IIS上注册此dll.

否则会有其他解决方案.
我参加了很多论坛,但没有得到任何解决方案.

如果您对COM Word组件有任何想法/建议,请回复我.

非常感谢,

Hi,

I created a web application in which I am generating a ms-word document using Microsoft.Office.Interop.Word dll.
The application is running fine in the visual studio but when I tried to run on IIS 5.0 through virtual directory then its giving the following error -

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

In my application I have taken reference of Microsoft Word 12.0 Object Library, but its coming as Microsoft.Office.Interop.Word dll, this interop dll is just a wrapper of the actual word COM dll.
But I have to register the actual word COM dll. so my problem is to find -

1) The path of the original word dll(COM)
2) How to register this dll, either using regsvr32 or to register on IIS.

OR there will be any other solution.
I have gone through many forums but did''nt get any solution.

If you have any idea/suggestion on COM Word components please revert me back.

Many Thanks,

推荐答案

最简单的方法是在运行IIS的服务器上安装MS Word.我建议您尽管加上<->"字样. COM作为服务的一部分参与了一个单独的过程,以避免不必时不时地重新启动IIS(请参阅警告).

注意事项:我参与了一个1999年的项目,该项目进行了MS Word COM互操作(来自Java和基于servlet的应用程序),并遇到了一个问题,即应用程序服务器必须不时地重新启动,因为内存泄漏,即MS Word或COM无法全部释放
尽管我们明确清理了所有资源.


干杯,


曼弗雷德(Manfred)
The easiest way I see it, would be to have MS Word installed on the server running your IIS. I advise you though to put the Word <--> COM part in a separate process as a service to avoid having to restart IIS every now and then (see Caveat).

Caveat: I was involved in a project 1999 that did MS Word COM interop (from java and a servlet based application) and ran into the problem that the application server had to restarted every now and then because there was a memory leak, that is MS Word or COM didn''t realease all
resources eventhough we explicitely cleaned everything up.


Cheers,


Manfred


这篇关于IIS上的Word自动化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆