问题描述
我只是想使用Microsoft Interop Word在我的asp net vb net Webform网站上填充单词点文件(使用书签).
I'm just trying to fill a word dot file (using bookmark) with my asp net vb net webform site using Microsoft Interop Word.
它在IIS Express上的调试中完美运行,但在Windows Server 2016/IIS 10上崩溃.
It works perfectly in debug on my IIS Express, but crash on my Windows Server 2016 / IIS 10.
Dim oWord As Word.Application
oWord = CreateObject("Word.Application")
服务器崩溃,并显示以下消息:
Server crash with message like this :
Cannot create ActiveX component.
(原始错误消息:不可能使作词者ActiveX崩溃.)
Cannot create ActiveX component.
(original error message : Impossible de créer le composant ActiveX.)
我正在寻找修复程序,但是有关此错误的很多帖子都过时了.
I was searching for a fix, but a lot of post about this error are old.
我尝试检查服务器注册表,并且密钥{000209FF-0000-0000-0000-C000-000000000046}在此处与Microsoft Word应用程序一起作为数据.
I tried to check the server registry and the key {000209FF-0000-0000-C000-000000000046} is here with Microsoft Word Application as data.
在服务器上,Microsoft Office 2016随Word一起安装.
On the server Microsoft Office 2016 is installed with Word.
谢谢
推荐答案
Microsoft当前不建议并且不支持从任何无人参与的非交互客户端应用程序或组件(包括ASP,ASP.NET,DCOM和NT Services)自动化Microsoft Office应用程序,因为Office可能表现出不稳定在这种环境中运行Office时的行为和/或死锁.
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
如果仅处理开放XML文档,则可以考虑使用Open XML SDK.请参见欢迎使用Office Open XML SDK 2.5 有关更多信息.
You may consider using the Open XML SDK instead if you deal with open XML documents only. See Welcome to the Open XML SDK 2.5 for Office for more information.
否则,您可以使用为服务器端执行而设计的任何第三方组件(例如,Aspose).
Otherwise, you may use any third-party components designed for server-side execution (for example, Aspose).
这篇关于使用Microsoft Interop Word的ASP .NET/VB .net-CreateObject("Word.Application")崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!