Reputation: 4470
I am currently building an ARM Template that deploys the following.
The problem is that after the .NET Core Application is deployed I want to execute a command in the console. I have tried a couple of different ways to do it via the CustomScriptExtension
, but I keep getting :
"No route registered for '/CustomScriptExtension?api-version=2015-06-15'"
Which makes me think that the Custom Script Extensions are supported for VMs only and not for App Services (I am a bit new to ARM Templating and there is nothing useful I could find in the Azure Quickstart Templates).
Any suggestions on how I can execute a simple command in the App Service command promt via an ARM Template ?
Upvotes: 0
Views: 884
Reputation: 603
I use the runcommand option of msdeploy to run a command after deployment. In my case I added a manifest.xml to the root of the zip file that will be deployed:
<MSDeploy.iisApp>
<runcommand path="move D:\home\site\wwwroot\applicationHost.xdt D:\home\site\" dontUseCommandExe="true" MSDeploy.MSDeployKeyAttributeName="path" />
</MSDeploy.iisApp>
The "MSDeploy.MSDeployKeyAttributeName="path"" is important. More details here.
The content of the path attribute will be executed on the remote mashine.
I hope this helps, KirK
Upvotes: 1