我可以通过门户设置Web应用程序的堆栈:
![通过门户设置堆栈](https://istack.dev59.com/i55uR.webp)
我通过ARM模板部署基础架构:
"apiVersion": "2015-08-01",
"type": "Microsoft.Web/sites",
"name": "[variables('name')]",
"location": "[parameters('location')]",
"dependsOn": [
"[concat(parameters('customer'),'-','webapp-small','-' , 'plan','-',parameters('env'))]"
],
"properties": {
"clientAffinityEnabled": false,
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', concat(parameters('customer'),'-','webapp-small','-' , 'plan','-',parameters('env')))]",
"siteConfig": {
"alwaysOn": "[parameters('webAppAlwaysOn')]",
"use32BitWorkerProcess": true,
"connectionStrings": [
],
"appSettings": [
{
"name": "WEBSITE_LOAD_CERTIFICATES",
"value": "[reference(variables('name')).thumbprint]"
},
{
"name": "WEBSITE_RUN_FROM_PACKAGE",
"value": 0
},
{
"name": "WEBSITE_ADD_SITENAME_BINDINGS_IN_APPHOST_CONFIG",
"value": 1
},
{
"name": "ASPNETCORE_ENVIRONMENT",
"value": "[parameters('AspNetCoreEnvironment')]"
},
{
"name": "EnvironmentOptions:ResourceGroupPostfix",
"value": "[parameters('env')]"
},
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(variables('aiWebName')).InstrumentationKey]"
},
{
"name": "IpWhiteList",
"value": "[parameters('whitelist')]"
}
]
}
}
}
这里部署的代码是一个.NET Core 2.2 应用程序。我找不到任何地方可以设置堆栈设置:https://learn.microsoft.com/en-us/azure/templates/microsoft.web/2018-11-01/sites,但是当我部署.NET Core代码时,一切都能正常工作。 "Stack settings"是什么?为什么我无法通过ARM进行设置?我需要设置吗?我想运行时可以猜测它是一个.NET Core应用程序,然后自动使其正常工作。