Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Azure Powershell cmdlet创建web应用程序插槽时出错_Azure_Azure Powershell_Azure Web App Service - Fatal编程技术网

使用Azure Powershell cmdlet创建web应用程序插槽时出错

使用Azure Powershell cmdlet创建web应用程序插槽时出错,azure,azure-powershell,azure-web-app-service,Azure,Azure Powershell,Azure Web App Service,我可以使用此命令成功创建新的Azure Web应用程序(当然,前提是资源组和应用程序服务计划存在): 但当我尝试使用类似命令添加插槽时,失败了: New-AzureWebApp ` -Name site-name ` -ResourceGroupName resource-group-name ` -Location 'North Central US' ` -AppServicePlan app-service-plan-name ` -SlotName dev # <

我可以使用此命令成功创建新的Azure Web应用程序(当然,前提是资源组和应用程序服务计划存在):

但当我尝试使用类似命令添加插槽时,失败了:

New-AzureWebApp `
  -Name site-name `
  -ResourceGroupName resource-group-name `
  -Location 'North Central US' `
  -AppServicePlan app-service-plan-name `
  -SlotName dev # <--------------------------- this line is added
这是怎么回事?我不是在用正确的方法制作老虎机吗?

注意:我正在
AzureResourceManager
模式下使用Azure Powershell

AzureServiceManagement
mode命令确实有效,因此我没有完全迷路:

New-AzureWebsite -Name "site-name" -Slot "dev" -Location "North Central US"

但是为什么我不能让前一个命令工作?

你的应用程序服务计划模式是什么?我希望这已经得到了注意,你应该在标准或溢价计划


这似乎是Azure模块最新版本的一个问题。将不得不等到问题解决。您可能需要提交Azure支持票证以提高优先级。

我对.net Azure.Management库也有同样的问题。我肯定这是个bug,所以我把它归档了:
New-AzureWebApp : MismatchingResourceName: The provided resource name 'site-name' 
did not match the name in the Url 'site-name/dev'.

At line:1 char:1
+ New-AzureWebApp -SlotName "dev" -Name "site-name" -Location "North  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [New-AzureWebApp], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.WebApp.Cmdlets.NewAzureWebAppCmdlet
New-AzureWebsite -Name "site-name" -Slot "dev" -Location "North Central US"