{"record":{"id":"fddeb337aae38898","repo":"TechnitiumSoftware/DnsServer","slug":"authrecordinfo-format-version-not-supported","errorCode":null,"errorMessage":"AuthRecordInfo format version not supported.","messagePattern":"AuthRecordInfo format version not supported\\.","errorType":"exception","errorClass":"InvalidDataException","httpStatus":null,"severity":"critical","filePath":"DnsServerCore/Dns/ResourceRecords/AuthRecordInfo.cs","lineNumber":223,"sourceCode":"                                    info.ZoneTransferProtocol = zoneTransferProtocol;\n\n                                if (tsigKeyName.Length > 0)\n                                    info.TsigKeyName = tsigKeyName;\n                            }\n                        }\n\n                        if (version >= 8)\n                        {\n                            bool useSoaSerialDateScheme = bR.ReadBoolean();\n\n                            if (this is SOARecordInfo info)\n                                info.UseSoaSerialDateScheme = useSoaSerialDateScheme;\n                        }\n                    }\n                    break;\n\n                default:\n                    throw new InvalidDataException(\"AuthRecordInfo format version not supported.\");\n            }\n        }\n\n        #endregion\n\n        #region protected\n\n        protected abstract void ReadRecordInfoFrom(BinaryReader bR);\n\n        protected abstract void WriteRecordInfoTo(BinaryWriter bW);\n\n        #endregion\n\n        #region public\n\n        public void WriteTo(BinaryWriter bW)\n        {\n            bW.Write((byte)9); //version","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/Dns/ResourceRecords/AuthRecordInfo.cs#L205-L241","documentation":"Thrown by AuthRecordInfo.ReadOldFormatFrom (the legacy deserializer reached when the on-disk version byte is < 9) when the version byte does not match any known case. Each case in the switch migrates an older AuthRecordInfo binary format; the default rejects any unrecognized version so a corrupt or future-format file fails loudly instead of being misread. This is the authoritative-record (zone) metadata persistence layer.","triggerScenarios":"Loading a zone file whose AuthRecordInfo header carries a version byte outside the handled set, or a file whose first byte was corrupted/truncated so the version reads as garbage. Triggered on zone load, import, or DNSSEC re-sign that re-reads records.","commonSituations":"Downgrading the DNS server to an older build that does not understand a newer zone format; a partially-written zone file from a crash; manual edits to the binary zone store.","solutions":["Restore the zone file from backup; the version byte mismatch usually means corruption or an incompatible file.","If this follows a server downgrade, upgrade back to the build that wrote the file, export the zone as a standard zone file, then re-import on the target build.","Delete and recreate the affected zone if no clean copy exists, then reload authoritative records from a transferred/cached source."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Wrap zone load; on legacy-format failure, fall back to text import or backup.\ntry { zone.Load(); }\ncatch (InvalidDataException ex) when (ex.Message == \"AuthRecordInfo format version not supported.\")\n{\n    _log.Error(\"Zone store incompatible/corrupt; restoring from backup or re-importing.\");\n    zone.RestoreFromBackupOrTextImport();\n}","preventionTips":["Keep zone backups; binary zone stores are version-coupled to the build that wrote them.","Export zones as standard text zone files before any server downgrade.","Never mix zone files across server builds."],"tags":["serialization","auth-record","zone","version","deserialization"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}