Accessing MS-Word object model via asp.net throw error: 80080005 Server execution failed(Exception from HRESULT: 0x80080005(CO_E_SERVER_EXEC_FAILURE))

-1

i have developed a website that allows users convert existing word file to PDF and download it, included references to Office.interop.word, and the site works fine on my development machine. When I uploaded it to my production server the functions not working in the server, In the server also installed MS-word. even i tried below methods

  1. In the command line put DCOMCNFG
  2. Component Services -> Computers -> My Computer -> DCOM Config
  3. Find "Microsoft Word 97 - 2003 Document" (If it is missing check if your Word is also 64 bit (if your Windows is))
  4. Right click -> Properties
  5. Go To Tab Security and Edit the "Customize" radio buttons so that IIS_IUSRS could have rights for launch and access
  6. Go to Tab Identity and choose "The interactive user"
  7. all this fails then i have tried to tab "General" and in "Authentication Level" drop down choose "None".

still the error continue...

Error : "Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))."

Can any one help me?

c#
asked on Stack Overflow Apr 11, 2016 by Velu • edited Apr 11, 2016 by Patrick Hofman

1 Answer

1

You have reached a dead end. Running Office programs inside an ASP.NET webserver is not supported:

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 would suggest to find other ways to do what you want. There are a lot of libraries capable of reading and writing Office documents without using Office itself.

answered on Stack Overflow Apr 11, 2016 by Patrick Hofman

User contributions licensed under CC BY-SA 3.0