I get a deployment Error when trying to publish a solution to Azure

Viewed 4762

Template deployment failed. Deployment operation statuses: Failed: /subscriptions/7696ec04-ba92-4f74-99ad-27808b065cfe/resourceGroups/BookService20211123165113ResourceGroup/deployments/website_deployment_20211124144346 (exception) error (SubscriptionIsOverQuotaForSku): This region has quota of 0 instances for your subscription. Try selecting different region or SKU.

2 Answers

There is currently (as of the time of this writing) an issue with creating a new Azure App Service directly from the 'Publish...' feature in Visual Studio for 'Free' Azure accounts. I do not believe Mohammad's answer is the best route since you are definitely allowed to use App Services under the 'Free' subscription in Azure and you should not have to upgrade your subscription to 'Pay as you go'.

To resolve this and avoid upgrading your subscription:

  • Open Azure portal online
  • Search for 'App Service'
  • Pick 'Create app service'
  • Pick your Subscription and Resource Group
  • Give it a Name
  • Fill in your appropriate parameters, such as: Code, .NET 6, Windows, EAST US, etc.
  • Pick your Windows Plan
  • Your 'Sku' should still say 'Free F1'
  • Zone redundancy will probably be greyed out
  • Press 'Review + create'
  • Press 'Create'
  • Wait for the deployment to finish and make sure you can see it in App Services.
  • Go back to Visual Studio and pick 'Select Existing' instead of 'Create New'
  • Open the folder structure all the way and pick the item your created (It will probably be right above 'Deployment Slots', but if nothing shows up, then the only solution I have for you is to upgrade to Visual Studio 2022 or open it in another version of Visual Studio and select 'Publish' again. That worked for me.)
  • Press OK

The exact steps may vary as Microsoft changes things, but the concept is that currently for Free accounts you have to to create the App Service in the Azure Portal first, instead of creating it through 'Publish' in Visual Studio.

I was using a trial subscription. I upgrade my subscription pay as you go (Basic). Now it works for me.

Related