使用Microsoft Interop Word的ASP .NET/VB .net-CreateObject("Word.Application")崩溃 [英] ASP .NET / VB .net Using Microsoft Interop Word - CreateObject("Word.Application") Crash

查看:109
本文介绍了使用Microsoft Interop Word的ASP .NET/VB .net-CreateObject("Word.Application")崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想使用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 Office都经过设计,测试和配置,可以作为最终用户产品在客户端工作站上运行.他们采用交互式桌面和用户个人资料.它们不能提供满足旨在无人值守运行的服务器端组件的需要所必需的可重入性或安全性级别.

All versions of Microsoft Office were designed, tested, and configured to run as end-user products on a client workstation. They assume an interactive desktop and user profile. They do not provide the level of reentrancy or security that is necessary to meet the needs of server-side components that are designed to run unattended.

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")崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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