TechnitiumSoftware/DnsServer · critical · InvalidDataException
AuthZoneInfo format version not supported.
Error message
AuthZoneInfo format version not supported.
What it means
AuthZoneInfo's BinaryReader constructor reads a version byte from the serialized zone data and dispatches on it via a switch statement supporting versions 1 through 14. If the version byte is outside this range (0 or >14), the default case throws InvalidDataException. The current writer emits version 14 (line 1194: bW.Write((byte)14)). This error means the on-disk zone file was written by a newer, incompatible server version, or the file is corrupted/truncated.
Source
Thrown at DnsServerCore/Dns/Zones/AuthZoneInfo.cs:648
_zoneTransfer = (AuthZoneTransfer)bR.ReadByte();
_zoneTransferNetworkACL = ReadNetworkACLFrom(bR);
_zoneTransferTsigKeyNames = ReadZoneTransferTsigKeyNamesFrom(bR);
_primaryNameServerAddresses = ReadNameServerAddressesFrom(bR);
_primaryZoneTransferProtocol = (DnsTransportProtocol)bR.ReadByte();
_primaryZoneTransferTsigKeyName = bR.BaseStream.ReadShortString();
if (_primaryZoneTransferTsigKeyName.Length == 0)
_primaryZoneTransferTsigKeyName = null;
_expiry = bR.BaseStream.ReadDateTime();
break;
}
}
break;
default:
throw new InvalidDataException("AuthZoneInfo format version not supported.");
}
}
internal AuthZoneInfo(ApexZone apexZone, bool loadHistory = false)
{
_apexZone = apexZone;
_name = _apexZone.Name;
_lastModified = _apexZone.LastModified;
_disabled = _apexZone.Disabled;
if (_apexZone is PrimaryZone primaryZone)
{
_type = AuthZoneType.Primary;
_catalogZoneName = _apexZone.CatalogZoneName;
_overrideCatalogQueryAccess = _apexZone.OverrideCatalogQueryAccess;
_overrideCatalogZoneTransfer = _apexZone.OverrideCatalogZoneTransfer;
_overrideCatalogNotify = _apexZone.OverrideCatalogNotify;View on GitHub (pinned to d0484b6c1e)
Solutions
- Upgrade the DNS server to a version that supports the format version indicated by the zone file (check CHANGELOG.md for version bumps).
- If the file is corrupted, restore from backup or delete the zone file and recreate the zone manually.
- If downgrading is required, export zones in a compatible format from the newer version first, then re-import after downgrade.
- Inspect the zone file's first byte to confirm the version number and diagnose whether it is corruption (unexpected value like 0 or 255) or a genuine version mismatch.
Example fix
// Not a code fix — this is a data/format compatibility issue. // Check the file's version byte: // var version = File.OpenRead(zonePath).ReadByte(); // If version > 14: upgrade the DNS server binary. // If version is garbage (0, 255): restore from backup.
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check the zone file version byte before attempting full load
using (var fs = File.OpenRead(zoneFilePath))
{
int version = fs.ReadByte();
if (version < 1 || version > 14)
throw new InvalidDataException($"Zone file '{zoneFilePath}' has unsupported format version {version}. Supported: 1-14.");
} Try / catch
try { zoneInfo = new AuthZoneInfo(bR, lastModified); }
catch (InvalidDataException ex) when (ex.Message.Contains("format version"))
{
// log the file path, alert admin about version mismatch or corruption
// restore from backup or skip the zone
} Prevention
- Do not downgrade the DNS server below the version that wrote the zone files.
- Export zones before upgrading in case rollback is needed.
- Maintain backups of zone config directories.
- Monitor server startup logs for InvalidDataException to catch corruption early.
When it happens
Trigger: Loading a zone info file (.zone file in the config/zones directory) whose version byte is not in {1..14}. Occurs at server startup or when the AuthZoneManager loads zone persistence data from disk.
Common situations: Downgrading the DNS server to an older version after running a newer one that wrote a higher format version; copying zone files between servers of different versions; file corruption from an improper shutdown, disk failure, or partial write; manually editing or truncating zone files.
Related errors
- DNSSEC private key format is invalid.
- DNSSEC private key version not supported: {version}
- DnsServer allowed zone file format is invalid.
- DnsServer allowed zone file version not supported.
- DnsServer zone file format is invalid.
AI-assisted analysis of TechnitiumSoftware/DnsServer@d0484b6c1e (2026-08-13).
Data as JSON: /api/errors/b20de068db793760.
Report an issue: GitHub.