[英]Azure REST Api 500 Internal Server Error when creating a app service slot in a virtual network
I've got an issue when creating a slot via the Azure REST Api found here通过此处找到的 Azure REST Api 创建插槽时遇到问题
If I specify a virtualNetworkSu.netId
property in the body of the request I get a 500 error with a generic "An Error Occurred" message.如果我在请求正文中指定一个virtualNetworkSu.netId
属性,我会收到 500 错误和一条通用的“发生错误”消息。 Full body is below.下面是全身。
{
"identity": {
"type": "SystemAssigned"
},
"kind": "app,linux,container",
"location": "westeurope",
"properties": {
"httpsOnly": true,
"hyperV": false,
"isXenon": false,
"reserved": false,
"scmSiteAlsoStopped": false,
"siteConfig": {
"acrUseManagedIdentityCreds": true,
"alwaysOn": true,
"http20Enabled": true,
"ipSecurityRestrictions": [
{
"action": "Allow",
"name": "AllowApim",
"priority": 100,
"vnetSubnetResourceId": "<apim subnet id>"
}
],
"linuxFxVersion": "<docker latest image>",
"localMySqlEnabled": false,
"minTlsVersion": "1.2",
"netFrameworkVersion": "v4.6"
},
"storageAccountRequired": false,
"virtualNetworkSubnetId": "<backend subnet id>"
}
}
If I remove the virtualNetworkSu.netId
property then the request returns a 200. The weird thing is I can then issue an update with the property in it and it assigns the slot to the su.net correctly.如果我删除virtualNetworkSu.netId
属性,则请求返回 200。奇怪的是,我可以使用其中的属性发出更新,并将插槽正确分配给 su.net。
Note I only see this on the slot not on the parent app service.请注意,我只在插槽上看到这个,而不是在父应用程序服务上。
I was expecting either this to be successful or an error message which I could identify the underlying cause.我期望这会成功或出现一条错误消息,我可以确定根本原因。
virtualNetworkSu.netId
is NOT in the following format那么virtualNetworkSu.netId
不是以下格式"virtualNetworkSubnetId": "<backend subnet id>"
virtualNetworkSu.netId
is in the followoing format:根据此MSDOC , virtualNetworkSu.netId
的格式如下:/subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}
After using the above format, I was able to get the following output:使用上述格式后,我能够得到以下 output:
Microsoft.web/serverFrams
.还要确保您已将在此处使用的 su.net 委托给Microsoft.web/serverFrams
。 To do this go to your .net in your azure portal then click on su.nets
tab then click on the su.net you are using then a popup will emerge where select Microsoft.web/serverFrams
and save.要在您的 azure 门户中将 go 发送到您的 .net,然后单击su.nets
选项卡,然后单击您正在使用的 su.net,然后将出现一个弹出窗口,其中 select Microsoft.web/serverFrams
并保存。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.