Search code examples
azureportal

Azure portal error when changing website web hosting plan


I have three Azure websites. All of them are in the "West Europe" Azure region and all are "Shared" scaling. One of the sites require a custom domain and SSL certificate, so the decision was made to scale the website to "Standard".

My understanding (after reading this blog post)is: A "Standard" web hosting plan is created and the site is moved to the new web hosting plan. A "Standard" web hosting plan, also allows me to have multiple sites using the same web hosting plan (i.e. the total cost of the "Standard" web host plan stays fixed regardless of the number of sites in that web hosting plan).

When I log into the "new" portal. My websites are now as follows:

Website A - West Europe - Shared - Hosting plan Default 1 Website B - West Europe - Shared - Hosting plan Default 1 Website C - West Europe - Standard - Hosting plan Default 2

I want to move websites A and B to the new Default 2 web hosting plan. I go to the specific website, click the three dots and click "Change Web Hosting Plan". I select the "Default 2 - Standard" web hosting plan.

Then all the tiles on the portal disappear, and the notification icon turns violet. When I click on the violet notifications icon, the following error notification is listed:

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.'.

Am I doing something wrong?

UPDATE: All sites are in the same resource group: "Default-Web-WestEurope"


Solution

  • Yes, as George said you are doing everything correct. I have contacted Microsoft Azure Support and gave them a screen shot of the error that I am getting. I will keep you updated as I hear back from MS Support (hopefully with a fix to the issue).

    UPDATE: So guys... still waiting to hear back from MS Support(as usual). I have found a fix using Microsoft Azure PowerShell.

    You will want to download MS Azure PowerShell. Once you have launched the program type what I have below:

    • Switch-AzureMode AzureResourceManager Enter
    • Add-AzureAccount (you will be prompted to sign in) Enter
    • $r = Get-AzureResource -Name siteNameGoesHere Enter
    • ResourceGroupName: nameofResourceGroup Enter
    • ResourceType: Microsoft.Web/sites Enter
    • ApiVersion: 2014-04-01 Enter
    • $p = $null; Enter
    • $p = @{'ServerFarm' = 'nameOfHostingPlan'} Enter(You must leave 'ServerFarm' but 'nameOfHostingPlan' is the plan you want to move the website to)
    • $r = Set-AzureResource -Name nameofSite -ResourceGroupName nameofResource -ResourceType Microsoft.Web/sites -ApiVersion 2014-04-01 -PropertyObject $p Enter

    Then you should return to the Azure Portal and hit refresh. I have done it twice today, it is somewhat tedious but a fix until MS fixes the button within the portal.

    Please let me know if you all need any help!