Azure App Service and Microsoft.Office.Interop.Word RRS feed

  • Question

  • I have a requirement to convert Word Doc file to html file .for that I used Microsoft office interop library to convert office document to html for the preview in the browser.The functionality works fine in the local machine .When i deployed it in azure web app i have got an error like below.

    Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154.

    i think this is an assembly issue in the server. If i install the office Package in the server its working right? but Microsoft is not recommended to do that. is there any way to get the solution. Please help me to resolve this issue.

    Thanks in advance!!!



    Thursday, May 7, 2020 7:30 AM

All replies

  • Hi,

    We got the same issue with app services.

    published console application as azure web job to read the data from excel. But getting the exception ''retrieving the com class factory for component with clsid {00024500-0000-0000-c000-000000000046} failed due to the following error: 80040154 class not registered (exception from hresult: 0x80040154 (regdb_e_classnotreg))''

    But working fine when we run manually.

    We found that it's because of app service does not have the reference of ''microsoft office interop'. But we added the reference to the project from nuget packages. 



    Thursday, November 19, 2020 1:23 PM