Run regsvr32 on app service

Shannon Dillon 21 Reputation points
2021-03-26T18:41:06.537+00:00

My team is working to migrate from running tasks in a Cloud Service to web jobs on an App Service. Two of our tasks require registering a COM dll. As part of the run.bat script for the two web jobs we are first calling regsvr32.exe before starting the task. However, the command fails with access denied. Is there a way to register COM dlls in an app service? Do we need to somehow elevate permissions before running the command?

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

Accepted answer
  1. Grmacjon-MSFT 15,441 Reputation points
    2021-03-29T05:48:32.547+00:00

    Hi @Shannon Dillon

    Thanks for your patience.

    Currently, you cannot register COM objects in an App Service (Web jobs, Web App, API App). This is because Azure Web apps does not provide us a way to access the virtual machine which hosts your web job.

    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 that would otherwise not be available. The sandbox mechanism aims to ensure that each app running on a machine will have a minimum guaranteed level of service; furthermore, the runtime limits enforced by the sandbox protects apps from being adversely affected by other resource-intensive apps which may be running on the same machine

    Possible solutions would be to use Windows Containers in App Service or use virtual machine which would give you full control of the machine and allow you to install whatever you want. Please read this related SO thread for more context.

    Hope that helps.

    -Grace

    0 comments No comments

0 additional answers

Sort by: Most helpful