c# - Azure: MissingRegistrationForLocation: The subscription is not registered for the resource type 'XXXX' in the location 'YYYY' -


this started out subscriptionnotfound error.

var dnsclient = new dnsmanagementclient(new microsoft.azure.tokencloudcredentials(result.accesstoken));  var zone = dnsclient.zones.createorupdate("someresourcegroup", "mydomain.com", new microsoft.azure.management.dns.models.zonecreateorupdateparameters {         ifnonematch = "*",         zone = new microsoft.azure.management.dns.models.zone {             name = "mydomain.com",             location = "northeurope"         }     }); 

now i've fixed that, reply on original question. it's still same code, , have re-registered feature/provider follow powershell command:

register-azurermresourceprovider -providernamespace microsoft.network 

but doesn't take location parameter, , error resource in location. gives? , have tried "north europe" instead of "northeurope", same result.

so missing? can't seem find data on issue, not here , not on google.

the complete error message is:

missingregistrationforlocation: subscription not registered resource type 'dnszones' in location 'northeurope'. please re-register provider in order have access location.

azure dns global service. please try changing location northeurope global. should fix error.

var zone = dnsclient.zones.createorupdate("someresourcegroup", "mydomain.com", new microsoft.azure.management.dns.models.zonecreateorupdateparameters {         ifnonematch = "*",         zone = new microsoft.azure.management.dns.models.zone {             name = "mydomain.com",             location = "global"         }     }); 

Comments