Subscription is not registered for the resource ty

2019-06-25 14:20发布

问题:

I am trying to deploy the web app to Azure but facing error Error during deployment for resource 'xxxWebApiDb' in resource group 'xxxWebApiGroup': NoRegisteredProviderFound: No registered resource provider found for location 'North Europe' and API version '2.0' for type 'servers'. The supported api-versions are '2014-01-01, 2014-04-01, 2014-04-01-preview'. The supported locations are 'northeurope, eastus, westus, southcentralus, eastus2, centralus, northcentralus, eastasia, southeastasia, japanwest, japaneast, westeurope, brazilsouth, australiaeast, australiasoutheast, centralindia, westindia, southindia, canadacentral, canadaeast'

回答1:

Can you check the version of the AzureSDK you have installed, and if it's < 2.9, install the latest SDK and try again. Here a similar case, refer to the link.



回答2:

I just got an alternative.

  1. Goto portal.azure.com
  2. Create a web app/app service in Azure Portal.
  3. Download publish profile.
  4. Now come to visual studio, right click on web app you want to publish, click publish>Log In to your subscription > Click on Import > Select Downloaded Publish profile.
  5. Done!

Enjoy.



回答3:

You have to register relevant resource providers with your subscription first (sql database in your example - namespace Microsoft.Sql). Azure CLI command to do this: https://docs.microsoft.com/en-us/azure/virtual-machines/azure-cli-arm-commands#azure-provider-commands-to-manage-resource-provider-registrations

See this too: https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-common-deployment-errors#noregisteredproviderfound