在 asp.net 中使用 Microsoft.Office.Interop.Word [英] Using Microsoft.Office.Interop.Word in asp.net

查看:31
本文介绍了在 asp.net 中使用 Microsoft.Office.Interop.Word的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 asp.net 应用程序中利用 Microsoft.Office.Interop.Word dll.长话短说,内部基于 Web 的文档管理/编辑系统需要临时访问 MS Word flesch-kincaid 值.我在控制台应用程序中使用这个 dll 没有问题,但是通过 asp.net 访问时我无法获得正确的权限.

I'm attempting to leverage the Microsoft.Office.Interop.Word dll in my asp.net application. Long story short, an internal web based document management/editing system requires access to a MS Word flesch-kincaid value on an ad-hoc basis. I have no problem using this dll in a console app, but I can't get the right permissions to it when accessed via asp.net.

由于以下错误,检索具有 CLSID {000209FF-0000-0000-C000-000000000046} 的组件的 COM 类工厂失败:80070005 访问被拒绝.(来自 HRESULT 的异常:0x80070005 (E_ACCESSDENIED)).

Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

我已经尝试了 这个论坛主题 没有运气.我在 Win7 上使用 .Net 4.0,我尝试了 32 位和 64 位版本的 MS Word.当我部署到运行 Windows Server 2008 R2 Standard 的服务器时,我也预计会有更多的头痛

I've tried everything in this forum thread with no luck. I'm using .Net 4.0 on Win7, I've tried both 32 and 64 bit versions of MS Word. I'm also anticipating more head-aches once I deploy to our server running Windows Server 2008 R2 Standard

推荐答案

由于 todda.speot.is 给出的原因,我会改用 openXML SDK

I would use the openXML SDK instead for the reason todda.speot.is gives

http://www.microsoft.com/下载/en/details.aspx?displaylang=en&id=5124

http://www.codeproject.com/Articles/87711/Manipulate-Docx-with-C-without-Microsoft-Word-inst

这篇关于在 asp.net 中使用 Microsoft.Office.Interop.Word的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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