![](/img/trans.png)
[英]Azure: MissingRegistrationForLocation: The subscription is not registered for the resource type 'XXXX' in the location 'YYYY'
[英]Deploying MVC app to Azure App Services Error - subscription is not registered for the resource type
我試圖直接從Visual Studio 2015公開MVC應用程序。 [右鍵單擊項目>發布>到Azure]每次我嘗試將我的Web應用程序發布到我的azure帳戶時,我都會收到以下錯誤:
**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.**
我曾嘗試使用多個位置來托管應用程序,但錯誤仍在繼續
問:如何注冊此組件? (我沒有在創建的應用程序中包含應用程序見解)
以下是有關錯誤的更多詳細信息:
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
當我嘗試使用powershell命令找到支持的區域時:
((Get-AzureRmResourceProvider -ProviderNamespace microsoft.insights).ResourceTypes | Where-Object ResourceTypeName -eq sites).Locations
結果變回空白。
問:這個microsoft.insights是什么,為什么會自動要求但不可用?
我真的希望有人可以幫助我
您可以使用PowerShell或Azure CLI執行此操作,也可以使用Portal部署WebApp一次。
$providers = @(Get-AzureRmResourceProvider -ListAvailable)
foreach ($x in $providers) {
Register-AzureRmResourceProvider -ProviderNamespace $x.ProviderNamespace -Force
write-host $x.ProviderNamespace
}
Write-Host “Done!”
以下是Azure CLI命令的鏈接。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.