Using Microsoft.Office.Interop.Word in asp.net

跟風遠走 提交于 2019-12-29 08:26:08

问题


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.

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)).

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


回答1:


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

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

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



来源:https://stackoverflow.com/questions/9438577/using-microsoft-office-interop-word-in-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!