Deploy MVC application for Azure App Services Error - subscription not registered for resource type

I am trying to publish an MVC application for azure from Visual Studio 2015 directly. [Right click project> Publish> In Azure] Every time I try to publish my web application for my azure account, I get the following error:

**The subscription is not registered for the resource type 'components' in the location 'Central US'. Please re-register for this provider in order to have access to this location.** 

I tried using several places to host the application, and the error still continues

Q: How to register for this component? (I did not include application information in my application when creating)

The following is a more detailed description of the error:

 OPERATION IDC16287A675C4B7D3 TRACKING IDb0355f45-867b-4328-95cd-6d627751c619 STATUSConflict PROVISIONING STATEFailed TIMESTAMP12/3/2016, 3:12:24 PM DURATIONPT0.8505384S TYPEmicrosoft.insights/components RESOURCE ID/subscriptions/a955ba0f-a5f6-4ba4-b7d4-a0dae7b87215/resourceGroups/DemoBEEApp1Resources/providers/microsoft.insights/components/DemoBEEApp2 STATUSMESSAGE{ "error": { "code": "MissingRegistrationForLocation", "message": "The subscription is not registered for the resource type 'components' in the location 'Central US'. Please re-register for this provider in order to have access to this location." } } RESOURCEDemoBEEApp2 

When I try to find the areas supported with the powershell command:

 ((Get-AzureRmResourceProvider -ProviderNamespace microsoft.insights).ResourceTypes | Where-Object ResourceTypeName -eq sites).Locations 

The result is returned.

See screenshot

Q: What is this world and why is it automatically required, but not available?

I really hope someone can help me

+7
c # asp.net-mvc azure azure-web-sites
source share
2 answers

you can do this using PowerShell or the Azure CLI, or you can just deploy WebApp once using the portal.

 $providers = @(Get-AzureRmResourceProvider -ListAvailable) foreach ($x in $providers) { Register-AzureRmResourceProvider -ProviderNamespace $x.ProviderNamespace -Force write-host $x.ProviderNamespace } Write-Host "Done!" 

Here's a link to the Azure CLI commands .

+2
source share

I updated the latest version of Azure Tools and the location problem was resolved. A new error occurred while trying to create a new Azure web application from visual studio

Screenshot

However, at least now I can publish to Azure using web deployment

0
source share

All Articles