0
votes

I need to use the same machine key for different asp.net web api applications (deployed on the different servers on azure).

I can set it via web.config (machine key) sections. But I would like to set it via ARM templates (azure).

Automation script in azure has machineKey property at the Microsoft.Web/sites/config resource (but it is null). Site template reference doesn't have machineKey property https://docs.microsoft.com/en-us/azure/templates/microsoft.web/sites

So I assume that I can't set it via arm (I tried without success, so for now I take it from app settings How to set machineKey on Azure Website) Does anyone know how to set machineKey section from azure templates?

1

1 Answers

0
votes

Based on my knowledge, it is not possible.

Azure template is used to give web app settings. You could use template to set Web App's name, node version, javaContainer,etc.. However, given the machine key is not an app setting - it's under the system.web section of the web.config.

I also check Web App template's resource, it does not provides such configuration.