How to register Microsoft Component Object Model in Azure

Sandesh Mainali 1 Reputation point
2021-01-27T21:27:51.597+00:00

I have deployed the .net c# console application as a webjobs in azure. Application is using Microsoft.Office.Interop.Excel.dll and Office.dll to convert the flat file to excel. I am facing issue that COM class factory is not register.
I looked lots of article but there is not any helpful questions/article which will tell how to register the COM in Azure so can run Microsoft.Office.Interop.Excel.dll

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,407 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 24,971 Reputation points Microsoft Employee
    2021-01-28T20:27:21.393+00:00

    @Sandesh Mainali , All Azure Web Apps (as well as Mobile App/Services, WebJobs and Functions) run in a secure environment called a sandbox. Each app runs inside its own sandbox, isolating its execution from other instances on the same machine as well as providing an additional degree of security and privacy which would otherwise not be available.

    Windows Servers have a bunch of COM servers configured and available for consumption by default; however the sandbox prevents access to all out-of-proc COM servers. like ADO (ActiveX Data Objects)/ a sandboxed app cannot call into WMI, or into MSIServer.

    I see that you have a SO thread on this-as Charles mentioned 'Using Microsoft.Office.Interop.Excel.dll depends on the server to install Office software.'