TechnitiumSoftware/DnsServer · critical · InvalidDataException

DNS Server auth config version not supported.

Error message

DNS Server auth config version not supported.

What it means

Thrown as InvalidDataException when the version byte read immediately after the "AS" magic is not 1, 2, or 3. The current server writes version 3; the loader only understands those three versions. This guards against loading a config written by a newer server build or a file whose version byte is garbage.

Source

Thrown at DnsServerCore/Auth/AuthManager.cs:552

                                    ssoGroupMap.TryAdd(key, value);
                                }

                                _ssoGroupMap = ssoGroupMap;
                            }
                            else
                            {
                                _ssoGroupMap = null;
                            }
                        }

                        restartWebService = !ssoIsStillDisabled && restartWebService;
                    }

                    break;

                default:
                    throw new InvalidDataException("DNS Server auth config version not supported.");
            }

            _groups = groups;
            _users = users;

            if (isConfigTransfer)
            {
                //sync only required permissions from newly loaded config
                foreach (KeyValuePair<PermissionSection, Permission> permission in permissions)
                {
                    switch (permission.Key)
                    {
                        case PermissionSection.Zones:
                            //sync user and group permissions as-is for zones section
                            Permission zonesPermission = _permissions[PermissionSection.Zones];

                            zonesPermission.SyncPermissions(permission.Value.UserPermissions);
                            zonesPermission.SyncPermissions(permission.Value.GroupPermissions);

View on GitHub (pinned to d0484b6c1e)

Solutions

  1. Run the same (or newer) DNS Server version that wrote the config, then let it migrate the file forward.
  2. Delete auth.config to start fresh with default credentials if migration is not required.
  3. Re-take the backup/transfer from a node running the same version as the target.
  4. Inspect the third byte of auth.config to confirm the version and decide on upgrade vs. reset.

Example fix

// before: loading a v4 config on a v3-only server -> InvalidDataException
// after: upgrade the server to match the config writer, or reset
//   byte[] b = File.ReadAllBytes(authConfigPath);
//   int version = b[2]; // 3rd byte after 'A','S'
// if (version > 3) { UpgradeServer(); }
Defensive patterns

Strategy: validation

Validate before calling

byte[] b = File.ReadAllBytes(authConfigPath);
int version = b.Length > 2 ? b[2] : -1;
if (version is < 1 or > 3)
    throw new InvalidOperationException($"Unsupported auth config version {version}; upgrade or reset the config.");

Type guard

bool IsSupportedAuthConfigVersion(int v) => v is 1 or 2 or 3;

Try / catch

try { StartServer(); }
catch (InvalidDataException ex) when (ex.Message.Contains("auth config version not supported"))
{
    UpgradeServerToMatchConfig(); // or delete auth.config to reset
}

Prevention

When it happens

Trigger: Loading an auth.config whose version byte is >= 4 (written by a newer server release) or a corrupt/0/garbage version byte. Happens on downgrade, on loading a transferred config from a newer node, or after binary corruption of the version field.

Common situations: Downgrading the DNS Server across a release that bumped the auth config schema; restoring a config backup taken on a newer version onto an older server; partial write leaving the version byte wrong; cluster sync pulling a newer-format config into an older node.

Related errors


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