更改网站 Web 托管计划时出现 Azure 门户错误

Azure portal error when changing website web hosting plan

我有三个 Azure 网站。它们都在 "West Europe" Azure 区域,并且都在 "Shared" 缩放。其中一个网站需要自定义域和 SSL 证书,因此决定将网站扩展到 "Standard"。

我的理解(阅读 this blog post 后)是:已创建 "Standard" 虚拟主机计划,并将网站移至新的虚拟主机计划。 "Standard" 网络托管计划还允许我有多个站点使用相同的网络托管计划(即 "Standard" 网络托管计划的总成本保持不变,无论该网络托管中的站点数量如何计划)。

当我登录 "new" 门户时。我的网站现在如下:

网站 A - 西欧 - 共享 - 托管计划默认 1 网站 B - 西欧 - 共享 - 托管计划默认 1 网站 C - 西欧 - 标准 - 托管计划默认 2

我想将网站 A 和 B 移动到新的 Default 2 网络托管计划。我转到特定网站,单击三个点,然后单击 "Change Web Hosting Plan"。我 select "Default 2 - Standard" 虚拟主机计划。

然后传送门上的所有图块消失,通知图标变成紫色。当我单击紫色通知图标时,会列出以下错误通知:

Failed to update website web hosting plan.
Failed to update website A to web hosting plan Default2. The request content was invalid and could not be deserialized: 'Error converting value "{
    "SubscriptionId": "db2a05ba-c00c-47d6-a583-3fe0e266*****",
    "ResourceGroup": "Default-Web-WestEurope",
    "Location": "West Europe",
    "Properties": {
        "Name": "A",
        "State": null,
        "HostNames": null,
        "WebSpace": null,
        "SelfLink": null,
        "RepositorySiteName": null,
        "Owner": null,
        "UsageState": 0,
        "Enabled": null,
        "AdminEnabled": null,
        "EnabledHostNames": null,
        "SiteProperties": null,
        "AvailabilityState": 0,
        "SSLCertificates": null,
        "Csrs": null,
        "Cers": null,
        "SiteMode": null,
        "HostNameSslStates": null,
        "ComputeMode": null,
        "ServerFarm": "Default3",
        "WebHostingPlan": null,
        "LastModifiedTimeUtc": "0001-01-01T00:00:00",
        "StorageRecoveryDefaultState": null,
        "ContentAvailabilityState": 0,
        "RuntimeAvailabilityState": 0,
        "SiteConfig": null,
        "DeploymentId": null,
        "TrafficManagerHostNames": null,
        "SKU": null,
        "PremiumAppDeployed": null,
        "ScmSiteAlsoStopped": null
    }
}" to type 'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Data.Definitions.ResourceDefinition'. Path '', line 1, position 879.'.

我是不是做错了什么?

更新:所有站点都在同一个资源组中:"Default-Web-WestEurope"

你做的一切都正确。

我过去曾多次成功地做到这一点。但是,我今天登录将另一个网站从免费层移动到共享层,并得到了你所做的确切错误。

这让我相信 Azure 可能存在问题(因为最近出现了很多问题)。

我会每隔一段时间再检查一次 hours/days。

是的,正如乔治所说,您所做的一切都是正确的。我已联系 Microsoft Azure 支持并向他们提供了我遇到的错误的屏幕截图。当我收到 MS 支持的回复时,我会及时通知您(希望问题得到解决)。

更新: 所以伙计们... 仍在等待 MS 支持的回复(像往常一样)。我已找到使用 Microsoft Azure PowerShell 的修复程序。

您需要下载 MS Azure PowerShell。 启动程序后,请输入以下内容:

  • Switch-AzureMode AzureResourceManager 输入
  • Add-AzureAccount(系统会提示您登录)输入
  • $r = Get-AzureResource -Name siteNameGoesHere 输入
  • ResourceGroupName: nameofResourceGroup 输入
  • ResourceType: Microsoft.Web/sites 输入
  • ApiVersion: 2014-04-01 输入
  • $p = $null; 输入
  • $p = @{'ServerFarm' = 'nameOfHostingPlan'} 进入(您必须离开'ServerFarm',但'nameOfHostingPlan'是您要将网站移动到的计划)
  • $r = Set-AzureResource -Name nameofSite -ResourceGroupName nameofResource -ResourceType Microsoft.Web/sites -ApiVersion 2014-04-01 -PropertyObject $p 输入

然后您应该 return 到 Azure 门户并点击刷新。我今天做了两次,这有点乏味,但在 MS 修复门户内的按钮之前是一个修复。

如果大家需要任何帮助,请告诉我!

这似乎仍然出现在 Azure 门户 (https://portal.azure.com). I have had success converting to a Standard plan in the past by going to the classic portal (https://manage.windowsazure.com) 中并在那里转换计划。