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.
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"
}
});
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments