简体   繁体   English

Azure REST Api 500 在 virtual.network 中创建应用服务槽时出现内部服务器错误

[英]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.我期望这会成功或出现一条错误消息,我可以确定根本原因。

  • Well virtualNetworkSu.netId is NOT in the following format那么virtualNetworkSu.netId不是以下格式
"virtualNetworkSubnetId": "<backend subnet id>"
  • According to this MSDOC the virtualNetworkSu.netId is in the followoing format:根据此MSDOCvirtualNetworkSu.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:

在此处输入图像描述

  • Also make sure that you have Delegated the su.net which you are using here to 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并保存。

在此处输入图像描述

  • Also, you can use your subscription Id instead of Subscription name int format此外,您可以使用订阅 ID 而不是订阅名称 int 格式

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure Devops 管道返回:'无法将 web package 部署到应用服务。 内部服务器错误(代码:500)' - Azure Devops Pipeline returning: 'Failed to deploy web package to App Service. Internal Server Error (CODE: 500)' ASP.NET Core 5.0 Web API 部署在应用程序服务调用第三方 API 间歇性失败并引发 500(内部服务器错误) - ASP.NET Core 5.0 Web API deployed in App service call third party API fails intermittently and raise 500 (Internal Server Error) 链接服务 Microsoft office inside a Managed Virtual Network 或 REST API - Linked Service Microsoft office inside a Managed Virtual Network or REST API Azure 存储模拟器返回 500 内部服务器错误 - Azure Storage Emulator returns 500 internal server error 将新端点添加到 Azure App Service 插槽上的 my.net6 API 时,我收到 404 not found ONLY on the new endpoints - When adding new endpoints to my net6 API on Azure App Service slot, I receive 404 not found ONLY on the new endpoints 下载angularjs模板时,Azure应用服务随机报错500 - Randomly getting error 500 in Azure App Service when downloading angularjs template Django Azure rest 框架调用500服务器错误 - Django Azure rest framework call 500 server error Terraform 错误:错误:创建 Su.net:原始错误:代码 =“NetcfgInvalidSu.net”消息 =“Su.net'内部'在 virtual.network 中无效 - Terraform error: Error: creating Subnet: Original Error: Code="NetcfgInvalidSubnet" Message="Subnet 'internal' is not valid in virtual network Django + Azure 中的 React App 给出服务器错误 - 每次 500 - Django + React App in Azure gives a server error - 500 everytime 我的 web api 在部署到 azure api 管理后获得 500 个内部服务器 - My web api get 500 internal server after deploy to azure api management
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM