Visual Studio 2015网站解决方案Microsoft Office Interop Word 15.0 [英] Visual Studio 2015 web site solution Microsoft Office Interop Word 15.0

查看:268
本文介绍了Visual Studio 2015网站解决方案Microsoft Office Interop Word 15.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个来自VS2005的旧网站解决方案,其文件夹结构未被修改,但代码在VS2015中已更改。


没有任何关于任何问题的投诉来自VS版本差异的问题。


我的代码可以读取MS Word文档并对文档执行一些处理并保存。


我有使用了Microsoft.office.interop.word.dll。该解决方案在本地工作正常但在IIS中部署到域时无法从Window Server 2012中运行。


我收到错误"无法加载文件或汇编办公室互操作版本= 15.0.0.0 ..........


我见过有人建议1.将MS Office安装到服务器上。我这样做了


我得到了不同的错误。


它给出了regdb错误。我已经更改DCOMCNFG按类似的问题的一些建议。


检索COM类工厂具有CLSID {000209FF-0000-0000-C000-000000000046}组件未能由于以下错误:没有登记(从HRESULT异常:0x80040154的(REGDB_E_CLASSNOTREG))80040154类


一些身体已经建议在计算器,与COM对象微软取代Microsoft.office.interop.word.dll。安装了"interop.microsoft.office.core.dll"的对象库,其运行方式与上述类似。



但它没有解决了regdb错误。



有人可以告诉我一个解决方案吗?




解决方案

您好,


>>解决方案在本地工作正常但在IIS中部署到域时无法从Window Server 2012中运行。


请访问
服务器端Office自动化的注意事项


Microsoft确实如此目前不推荐,也不支持从任何无人参与的非交互式客户端应用程序或组件(包括ASP,ASP.NET,DCOM和NT服务)自动化Microsoft Office应用程序,因为Office可能会出现
不稳定的行为和/或在此环境中运行Office时出现死锁。


我建议您使用Open XML Library而不是Microsoft.Interop dll。


问候,


Celeste


I have a old web site solution from VS2005 whose folder structure is not modified but code is changed in VS2015.

No complaints about any problems from VS version difference.

I have code that reads a MS Word Doc and does some process to the doc and saves.

I have used Microsoft.office.interop.word.dll. The solution is working fine in local but failing from Window Server 2012 when deployed to domain in IIS.

I was getting Error "could not load file or assembly office interop version=15.0.0.0..........

I have seen people suggesting 1. to install MS Office on to server. I did that

I was getting different error.

It is giving regdb error. I have made changes to dcomcnfg as per some suggestion of similar problems.

Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

SOme body has suggested in stackoverflow, to replace Microsoft.office.interop.word.dll with COM Object Microsoft.object library which installed "interop.microsoft.office.core.dll which is working as similar as above one.

But it has not resolved the regdb error.

Can somebody throw some light here to show me a solution?

解决方案

Hi,

>>The solution is working fine in local but failing from Window Server 2012 when deployed to domain in IIS.

Please visit Considerations for server-side Automation of 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.

I suggest you use Open XML Library instead of Microsoft.Interop dll.

Regards,

Celeste


这篇关于Visual Studio 2015网站解决方案Microsoft Office Interop Word 15.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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