.Net C# web application that generates a word document from one of its web page.
In dev server we have recently upgraded the microsoft office version from 2010 to 2016. while initializing word dll running into issues (in one another environment still we have office 2010 installed and we don't see this issue, but the microsoft office upgrade from 2010 to 2016 is mandatory). So i need help to fix this issue.
using Word = Microsoft.Office.Interop.Word;
.....
App wrodApp = new Word.Application();
--> this line causing the below error
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)).
Please let me know how to resolve this issue?
Here is what MS states:
Read more about that in the Considerations for server-side Automation of Office article.
You may consider third-party components designed for the server-side execution instead. Or, if you deal with Open XML documents only, you may consider using the Open XML SDK 2.5 for Office.