从ASP.Net读取/写入Word文档

编程入门 行业动态 更新时间:2024-10-23 15:22:06
本文介绍了从ASP.Net读取/写入Word文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们已经编写了一个Web应用程序,以使用Microsoft Interop程序集读取ms-word文档.由于开发服务器已安装ms-office,因此工作正常.该应用程序未在未安装ms-office的生产服务器上运行,并收到错误消息: System.UnauthorizedAccessException:由于以下错误,检索具有CLSID {000209FF-0000-0000-C000-000000000046}的组件的COM类工厂失败:80070005 我们只有有限的权限访问我们的生产服务器 任何帮助将不胜感激 谢谢 问候 Raj

We have written a web application to read ms-word document using microsoft interop assembly. It is working fine as the developement server has got ms-office installed. The application is not running on the production server where ms-office is not installed and getting error message: System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 We have only limited access to our production server Any help would be appreciated Thank you Regards Raj

推荐答案

如果使用的是Microst Interop Assembly,则需要在生产服务器中安装MS-Office.因为Interop程序集是COM对象(在本例中为MS-Word)的包装,它将提供对MS-Word应用程序的访问. 您也可以使用OpenXML SDK读取/写入Word 2007格式(.docx)文档,该文档不需要在框中安装MS-Office. If you are using Microst Interop Assembly then you need to install MS-Office in your production server. Because Interop assembly is a wrapper of COM object (in this case MS-Word) which will provide the access to the MS-Word application. Also you can read/write Word 2007 Format (.docx) document using OpenXML SDK, which does not require MS-Office installed in the box.

更多推荐

从ASP.Net读取/写入Word文档

本文发布于:2023-11-06 14:29:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1563943.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文档   ASP   Net   Word

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!