TechnitiumSoftware/DnsServer · critical · InvalidDataException

GenericRecordInfo format version not supported.

Error message

GenericRecordInfo format version not supported.

What it means

Thrown by GenericRecordInfo.ReadRecordInfoFrom when the version byte is not 1 or 2. GenericRecordInfo is the base metadata for non-specialized authoritative records (disabled flag, comments, last-modified, expiry TTL). Version 2 is the current writer format; the default rejects anything else to avoid misinterpreting an incompatible or corrupt record.

Source

Thrown at DnsServerCore/Dns/ResourceRecords/GenericRecordInfo.cs:75

                case 1:
                    _disabled = bR.ReadBoolean();
                    _comments = bR.BaseStream.ReadShortString();

                    ReadExtendedRecordInfoFrom(bR);
                    break;

                case 2:
                    _disabled = bR.ReadBoolean();
                    _comments = bR.BaseStream.ReadShortString();

                    _lastModified = bR.BaseStream.ReadDateTime();
                    _expiryTtl = bR.ReadUInt32();

                    ReadExtendedRecordInfoFrom(bR);
                    break;

                default:
                    throw new InvalidDataException("GenericRecordInfo format version not supported.");
            }
        }

        protected sealed override void WriteRecordInfoTo(BinaryWriter bW)
        {
            bW.Write((byte)2); //version

            bW.Write(_disabled);

            if (string.IsNullOrEmpty(_comments))
                bW.Write((byte)0);
            else
                bW.BaseStream.WriteShortString(_comments);

            bW.BaseStream.WriteDateTime(_lastModified);
            bW.Write(_expiryTtl);

            WriteExtendedRecordInfoTo(bW);

View on GitHub (pinned to d0484b6c1e)

Solutions

  1. Restore the record/zone from a backup written by a compatible build.
  2. Re-import the zone from a standard text zone file instead of the binary store so metadata is rebuilt fresh.
  3. Upgrade the server to the version that wrote the file, then re-export if a downgrade is required.
Defensive patterns

Strategy: try-catch

Try / catch

try { record.Load(); }
catch (InvalidDataException ex) when (ex.Message == "GenericRecordInfo format version not supported.")
{ _log.Error("Record store incompatible; restore from backup or text import."); }

Prevention

When it happens

Trigger: Deserializing a generic record whose version byte is outside {1,2}, typically from a file written by a newer server, a corrupt file, or a truncated stream where the version byte is wrong.

Common situations: Server downgrade across a GenericRecordInfo format bump; corrupt zone file after a crash; importing a zone exported by a much newer build.

Related errors


AI-assisted analysis of TechnitiumSoftware/DnsServer@d0484b6c1e (2026-08-13). Data as JSON: /api/errors/f6ab28f7328ac3c0. Report an issue: GitHub.