{"record":{"id":"ee6a359b78770aac","repo":"TechnitiumSoftware/DnsServer","slug":"historyrecordinfo-format-version-not-supported","errorCode":null,"errorMessage":"HistoryRecordInfo format version not supported.","messagePattern":"HistoryRecordInfo format version not supported\\.","errorType":"exception","errorClass":"InvalidDataException","httpStatus":null,"severity":"warning","filePath":"DnsServerCore/Dns/ResourceRecords/HistoryRecordInfo.cs","lineNumber":66,"sourceCode":"        {\n            return new HistoryRecordInfo(bR);\n        }\n\n        #endregion\n\n        #region protected\n\n        protected override void ReadRecordInfoFrom(BinaryReader bR)\n        {\n            byte version = bR.ReadByte();\n            switch (version)\n            {\n                case 1:\n                    _deletedOn = bR.BaseStream.ReadDateTime();\n                    break;\n\n                default:\n                    throw new InvalidDataException(\"HistoryRecordInfo format version not supported.\");\n            }\n        }\n\n        protected override void WriteRecordInfoTo(BinaryWriter bW)\n        {\n            bW.Write((byte)1); //version\n\n            bW.BaseStream.WriteDateTime(_deletedOn);\n        }\n\n        #endregion\n\n        #region properties\n\n        public DateTime DeletedOn\n        {\n            get { return _deletedOn; }\n            set { _deletedOn = value; }","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/Dns/ResourceRecords/HistoryRecordInfo.cs#L48-L84","documentation":"Thrown by HistoryRecordInfo.ReadRecordInfoFrom when the version byte read from a history (deleted-record) entry is not 1. HistoryRecordInfo stores only the deletion timestamp; version 1 is the sole supported writer format. The default branch rejects any other version so a corrupt or incompatible history file fails fast instead of producing wrong deletion times.","triggerScenarios":"Deserializing a zone history entry whose version byte is not 1, e.g. from a newer server's history file, a truncated file, or a corrupted history store. Triggered when the zone history view is loaded.","commonSituations":"Server downgrade after a HistoryRecordInfo format change; history file corruption after a crash; restoring a history backup from an incompatible build.","solutions":["Clear the zone's history store (the deleted-records history) so new entries are written in the current format.","Restore history from a backup produced by a compatible build, or accept history loss for the affected zone.","Upgrade to the build that wrote the history file if you need to preserve it before downgrading."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// History is non-critical; on format error, skip the entry.\ntry { entry = new HistoryRecordInfo(bR); }\ncatch (InvalidDataException ex) when (ex.Message == \"HistoryRecordInfo format version not supported.\")\n{ entry = null; }","preventionTips":["Treat zone history as disposable; clear it when downgrading server versions.","Back up history separately if deletion timestamps are operationally important."],"tags":["serialization","history-record","version","deserialization","zone"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}