question

ShannonDillon-3692 avatar image
0 Votes"
ShannonDillon-3692 asked Grmacjon-MSFT answered

Run regsvr32 on app service

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-webapps-webjobs
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Grmacjon-MSFT avatar image
0 Votes"
Grmacjon-MSFT answered

Hi @ShannonDillon-3692

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


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.