This started out as a 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, thanks to the reply on the original question. It's still the same code, and I have re-registered for the feature/provider with the follow powershell command:
Register-AzurermresourceProvider -ProviderNamespace Microsoft.Network
But that doesn't take an location parameter, and the error is about a resource in a location. What gives? And I have tried with "North Europe" instead of "northeurope", same result.
So what am I missing? Can't seem to find any data on this issue, not here and not on Google.
The complete error message is:
MissingRegistrationForLocation: The subscription is not registered for the resource type 'dnszones' in the location 'northeurope'. Please re-register for this provider in order to have access to this location.
Just got this error message while trying to deploy through Visual Studio 2015. Upgrading to the latest Azure SDK, v2.9.6, fixed the problem.
Azure DNS is a global service. Please try changing your location from northeurope
to global
. That should fix the 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"
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With