2

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

miniMan
  • 53
  • 1
  • 6
  • 3
    http://support.microsoft.com/kb/257757 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. – ta.speot.is Feb 24 '12 at 22:07

1 Answers1

2

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

Micah Armantrout
  • 6,781
  • 4
  • 40
  • 66
  • This is not what the OP needs. He is not asking about creating or manipulating word documents but he needs a function (calculate the flesch-kincaid score of a text) from word itself. What he needs however (word in a server environment) is unfortunately not supported and known to cause all sorts of problems – Eddy Feb 24 '12 at 22:55
  • Actually this is not a problem editing it on a server as long as you don't use microsoft word which is exactly what the link is for. This does solve the problem of needing to change a word document on a server – Micah Armantrout Mar 19 '13 at 15:36
  • Again: It's not about editing a document. It's about the functionality in the msword dll to calculate a flesh-kincaid score for a document. If you think this can be done with the openXml SDK please be more specific in your answer and show us how – Eddy Mar 19 '13 at 16:22