Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying MVC app to Azure App Services Error - subscription is not registered for the resource type

I am trying to public an MVC application to azure from Visual Studio 2015 directly.[Right click project > Publish > To Azure] Every time i try to Publish my web application to 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 have tried to use multiple locations to host the application and the error still continues

Q: How does one register for this component? (i have not included application insights in my application on creation)

Below is more details around 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 find the areas supported using the powershell command:

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

The result comes back blank.

See Screenshot

Q: What is this microsoft.insights and why is it automatically required but not available?

I really hope somebody can assist me

like image 328
Keith Avatar asked Dec 03 '16 13:12

Keith


1 Answers

you can do that with PowerShell or Azure CLI, or you could just deploy the 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 the link to the Azure CLI commands.

like image 140
4c74356b41 Avatar answered Oct 23 '22 18:10

4c74356b41