TechnitiumSoftware/DnsServer · critical · InvalidDataException

NSRecordInfo format version not supported.

Error message

NSRecordInfo format version not supported.

What it means

Thrown by NSRecordInfo.ReadExtendedRecordInfoFrom when the version byte is not the handled case. NSRecordInfo extends GenericRecordInfo with glue records; the version byte governs that extended block. The default rejects unknown versions to avoid misreading the glue-record array length and corrupting subsequent records.

Source

Thrown at DnsServerCore/Dns/ResourceRecords/NSRecordInfo.cs:70

            {
                case 0: //no extended info
                    break;

                case 1:
                    int count = bR.ReadByte();
                    if (count > 0)
                    {
                        DnsResourceRecord[] glueRecords = new DnsResourceRecord[count];

                        for (int i = 0; i < glueRecords.Length; i++)
                            glueRecords[i] = new DnsResourceRecord(bR.BaseStream);

                        _glueRecords = glueRecords;
                    }
                    break;

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

        protected override void WriteExtendedRecordInfoTo(BinaryWriter bW)
        {
            bW.Write((byte)1); //version

            if (_glueRecords is null)
            {
                bW.Write((byte)0);
            }
            else
            {
                bW.Write(Convert.ToByte(_glueRecords.Count));

                foreach (DnsResourceRecord glueRecord in _glueRecords)
                    glueRecord.WriteTo(bW.BaseStream);
            }

View on GitHub (pinned to d0484b6c1e)

Solutions

  1. Restore the zone from a backup written by a compatible build.
  2. Re-create the NS records and their glue from scratch via the web console or zone import.
  3. Upgrade to the version that wrote the file, re-export as a standard zone file, then import on the target build.
Defensive patterns

Strategy: try-catch

Try / catch

try { nsRecord.Load(); }
catch (InvalidDataException ex) when (ex.Message == "NSRecordInfo format version not supported.")
{ _log.Error("NS record store incompatible; restore zone from backup or re-import."); }

Prevention

When it happens

Trigger: Deserializing an NS record whose extended-info version byte is unrecognized, typically from a file written by an incompatible server version or a truncated stream where the version reads wrong.

Common situations: Downgrade across an NSRecordInfo format change; corrupt zone store; importing a zone with glue records from a much newer build.

Related errors


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