{"record":{"id":"6e8f7022127c17ba","repo":"TechnitiumSoftware/DnsServer","slug":"web-service-config-version-not-supported","errorCode":null,"errorMessage":"Web Service config version not supported.","messagePattern":"Web Service config version not supported\\.","errorType":"exception","errorClass":"InvalidDataException","httpStatus":null,"severity":"critical","filePath":"DnsServerCore/DnsWebService.cs","lineNumber":480,"sourceCode":"            foreach (AuthZoneInfo zone in zones)\n            {\n                _authManager.SetPermission(PermissionSection.Zones, zone.Name, admins, PermissionFlag.ViewModifyDelete);\n                _authManager.SetPermission(PermissionSection.Zones, zone.Name, dnsAdmins, PermissionFlag.ViewModifyDelete);\n            }\n\n            _authManager.SaveConfigFile();\n        }\n\n        private void ReadConfigFrom(Stream s)\n        {\n            if (Encoding.ASCII.GetString(s.ReadExactly(2)) != \"WC\") //format\n                throw new InvalidDataException(\"Web Service config file format is invalid.\");\n\n            BinaryReader bR = new BinaryReader(s);\n\n            int version = bR.ReadByte();\n            if (version > 4)\n                throw new InvalidDataException(\"Web Service config version not supported.\");\n\n            _webServiceHttpPort = bR.ReadInt32();\n            _webServiceTlsPort = bR.ReadInt32();\n\n            {\n                IPAddress[] webServiceLocalAddresses;\n\n                int count = bR.ReadByte();\n                if (count > 0)\n                {\n                    IPAddress[] localAddresses = new IPAddress[count];\n\n                    for (int i = 0; i < count; i++)\n                        localAddresses[i] = IPAddressExtensions.ReadFrom(bR);\n\n                    webServiceLocalAddresses = localAddresses;\n                }\n                else","sourceCodeStart":462,"sourceCodeEnd":498,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/DnsWebService.cs#L462-L498","documentation":"InvalidDataException thrown by ReadConfigFrom when the version byte read after the 'WC' signature is greater than 4. Each config format revision bumps this byte; an older server binary refuses a config written by a newer server to avoid misinterpreting fields it does not know.","triggerScenarios":"Loading a Web Service config file produced by a newer Technitium version into an older binary. The version byte exceeds 4, so the loader rejects it.","commonSituations":"Downgrading the DNS server after running a newer release; copying a config from a newer node into an older one; restoring a backup made on a newer version onto an older install.","solutions":["Upgrade the Technitium DNS Server binary to a version that understands config version > 4.","Restore a config file written by this (or older) server version instead of the newer one.","Start fresh: remove the config so defaults are regenerated, then reconfigure manually."],"exampleFix":"null","handlingStrategy":"validation","validationCode":"// Read the version byte and refuse configs newer than this binary supports\nusing var fs = File.OpenRead(configPath);\nfs.ReadByte(); fs.ReadByte(); // skip 'WC'\nint version = fs.ReadByte();\nif (version > 4)\n    throw new InvalidDataException($\"Config version {version} is newer than this server supports.\");","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Match or exceed the Technitium version that wrote the config.","Do not restore configs from newer nodes onto older installs.","Track the config version when copying between environments."],"tags":["dns-server","technitium","configuration","version-mismatch","downgrade","binary-config","csharp"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}