{"record":{"id":"0846b63b17703e98","repo":"TechnitiumSoftware/DnsServer","slug":"secondary-catalog-name-server-addresses-cannot-hav","errorCode":null,"errorMessage":"Secondary Catalog name server addresses cannot have more than 255 entries.","messagePattern":"Secondary Catalog name server addresses cannot have more than 255 entries\\.","errorType":"validation","errorClass":"ArgumentOutOfRangeException","httpStatus":null,"severity":"error","filePath":"DnsServerCore/Dns/Zones/ApexZone.cs","lineNumber":1407,"sourceCode":"                else\n                    _notifyNameServers = value;\n\n                lock (_notifyFailed)\n                {\n                    _notifyFailed.Clear();\n                }\n            }\n        }\n\n        public IReadOnlyCollection<IPAddress> NotifySecondaryCatalogNameServers\n        {\n            get { return _notifySecondaryCatalogNameServers; }\n            set\n            {\n                if ((value is null) || (value.Count == 0))\n                    _notifySecondaryCatalogNameServers = null;\n                else if (value.Count > byte.MaxValue)\n                    throw new ArgumentOutOfRangeException(nameof(NotifySecondaryCatalogNameServers), \"Secondary Catalog name server addresses cannot have more than 255 entries.\");\n                else\n                    _notifySecondaryCatalogNameServers = value;\n\n                lock (_notifyFailed)\n                {\n                    _notifyFailed.Clear();\n                }\n            }\n        }\n\n        public virtual AuthZoneUpdate Update\n        {\n            get { return _update; }\n            set { _update = value; }\n        }\n\n        public IReadOnlyCollection<NetworkAccessControl> UpdateNetworkACL\n        {","sourceCodeStart":1389,"sourceCodeEnd":1425,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/Dns/Zones/ApexZone.cs#L1389-L1425","documentation":"Thrown by the NotifySecondaryCatalogNameServers setter when the supplied IPAddress collection has more than 255 entries. Same single-byte persistence constraint; null/empty clears the list, > 255 is rejected. Setting also clears the _notifyFailed tracking state. This list targets catalog-zone-aware secondary name servers.","triggerScenarios":"Assigning > 255 catalog secondary NOTIFY targets; bulk-loading a catalog peer roster.","commonSituations":"Large catalog-zone distribution with many leaf secondaries enumerated individually.","solutions":["Limit NotifySecondaryCatalogNameServers to <= 255 addresses; consolidate behind fewer catalog hubs.","Use catalog-zone members (configured on the secondaries) instead of an exhaustive notify list.","Deduplicate addresses before assigning."],"exampleFix":"// before\nzone.NotifySecondaryCatalogNameServers = catalogPeers; // Count > 255 -> throws\n// after\nzone.NotifySecondaryCatalogNameServers = catalogPeers.Distinct().Take(255).ToList();","handlingStrategy":"validation","validationCode":"if (servers != null && servers.Count > byte.MaxValue)\n    throw new InvalidOperationException($\"NotifySecondaryCatalogNameServers capped at 255 (got {servers.Count}).\");\nzone.NotifySecondaryCatalogNameServers = servers;","typeGuard":"static bool IsValidCatalogNotifyCount(IReadOnlyCollection<IPAddress> servers) => servers is null || servers.Count <= byte.MaxValue;","tryCatchPattern":"try { zone.NotifySecondaryCatalogNameServers = servers; }\ncatch (ArgumentOutOfRangeException ex) when (ex.ParamName == nameof(zone.NotifySecondaryCatalogNameServers))\n{ zone.NotifySecondaryCatalogNameServers = servers.Distinct().Take(byte.MaxValue).ToList(); }","preventionTips":["Consolidate catalog leaf secondaries behind fewer hubs.","Rely on catalog-zone member config on the secondaries instead of an exhaustive list.","Deduplicate addresses before assigning.","Enforce the 255 cap at the config UI."],"tags":["dns","notify","catalog-zone","zone-transfer","validation"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}