{"record":{"id":"95ebce6b36589088","repo":"TechnitiumSoftware/DnsServer","slug":"the-notify-option-is-invalid-for-zonetype-zones","errorCode":null,"errorMessage":"The Notify option is invalid for {zoneType} zones: {value}","messagePattern":"The Notify option is invalid for (.+?) zones: (.+?)","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"DnsServerCore/Dns/Zones/PrimaryZone.cs","lineNumber":2812,"sourceCode":"\n                base.Disabled = value; //set value early to be able to use it for notify\n\n                if (value)\n                    DisableNotifyTimer();\n                else\n                    TriggerNotify();\n            }\n        }\n\n        public override AuthZoneNotify Notify\n        {\n            get { return base.Notify; }\n            set\n            {\n                switch (value)\n                {\n                    case AuthZoneNotify.SeparateNameServersForCatalogAndMemberZones:\n                        throw new ArgumentException(\"The Notify option is invalid for \" + GetZoneTypeName() + \" zones: \" + value.ToString(), nameof(Notify));\n                }\n\n                base.Notify = value;\n            }\n        }\n\n        public IReadOnlyCollection<DnssecPrivateKey> DnssecPrivateKeys\n        {\n            get\n            {\n                if (_dnssecPrivateKeys is null)\n                    return null;\n\n                lock (_dnssecPrivateKeys)\n                {\n                    return _dnssecPrivateKeys.Values;\n                }\n            }","sourceCodeStart":2794,"sourceCodeEnd":2830,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/Dns/Zones/PrimaryZone.cs#L2794-L2830","documentation":"Thrown by the PrimaryZone.Notify setter when value is AuthZoneNotify.SeparateNameServersForCatalogAndMemberZones. That option is meaningful only for catalog zones (it splits notify targets between catalog and member zones); a plain PrimaryZone has no member-zone semantics, so assigning it is rejected with ArgumentException naming the offending value.","triggerScenarios":"Setting zone.Notify = AuthZoneNotify.SeparateNameServersForCatalogAndMemberZones on a PrimaryZone (non-catalog).","commonSituations":"Reusing a zone-options object across zone types; copying config from a catalog zone to a primary; deserializing a settings file that contained the catalog-only value.","solutions":["Use a supported Notify value for PrimaryZone: None, ZoneNameServers, SpecifiedNameServers, or BothZoneAndSpecifiedNameServers.","Keep catalog-specific options out of primary-zone config objects.","Validate the Notify enum against zone type before assigning."],"exampleFix":"// before\nzone.Notify = AuthZoneNotify.SeparateNameServersForCatalogAndMemberZones;\n\n// after\nzone.Notify = AuthZoneNotify.BothZoneAndSpecifiedNameServers;","handlingStrategy":"type-guard","validationCode":"static readonly HashSet<AuthZoneNotify> PrimaryValid = new()\n{\n    AuthZoneNotify.None, AuthZoneNotify.ZoneNameServers,\n    AuthZoneNotify.SpecifiedNameServers, AuthZoneNotify.BothZoneAndSpecifiedNameServers\n};\nif (PrimaryValid.Contains(value)) zone.Notify = value;","typeGuard":"static bool IsValidForPrimary(AuthZoneNotify v) =>\n    v != AuthZoneNotify.SeparateNameServersForCatalogAndMemberZones;","tryCatchPattern":"null","preventionTips":["Keep catalog-only options out of primary-zone config templates.","Validate Notify against zone type when deserializing settings."],"tags":["dns","primary-zone","notify","config","enum","zone-type"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}