该问题可能是由于尝试在不同计划之间分配App Service环境v2多角色池造成的。解决该问题需要创建新的App Service计划并将多角色池与其相关联。要执行此操作,请使用以下代码示例:
$ResourceGroupName = yourResourceGroupName" $AseName = "yourAseName" $PlanName = "yourNewPlanName" $Location = "yourLocation"
$plan = New-AzAppServicePlan -ResourceGroupName $ResourceGroupName -Name $PlanName
-Location $Location -Tier "Premium"
-NumberofWorkers 1 `
-WorkerSize "Medium"
$ase = Get-AzAppServiceEnvironment -ResourceGroupName $ResourceGroupName ` -Name $AseName
New-AzWebAppPool -ResourceGroupName $ResourceGroupName -AppServicePlanName $plan.Name
-Name $ase.MultiRolePoolName -NumberOfWorkers $ase.MultiRoleSize
-WorkerSize $ase.MultiRoleWorkerSize
Set-AzAppServiceEnvironment -ResourceGroupName $ResourceGroupName -Name $AseName
-MultiRolePoolExistingPlan $plan.Id"
请确保替换上述代码示例中的变量,使其与特定环境相适应。"