{"record":{"id":"c74558e44666882d","repo":"TechnitiumSoftware/DnsServer","slug":"no-such-user-exists-actingusername","errorCode":null,"errorMessage":"No such user exists: {actingUsername}","messagePattern":"No such user exists: (.+?)","errorType":"http","errorClass":"DnsWebServiceException","httpStatus":null,"severity":"error","filePath":"DnsServerCore/DnsWebService.cs","lineNumber":2623,"sourceCode":"            context.Items[\"session\"] = session;\n\n            return true;\n        }\n\n        private User GetSessionUser(HttpContext context, bool standardOnly = false)\n        {\n            UserSession session = context.GetCurrentSession();\n\n            if ((session.Type == UserSessionType.ClusterApiToken) && _clusterManager.ClusterInitialized)\n            {\n                //proxy call from cluster node \n                string actingUsername = context.Request.GetQueryOrForm(\"actingUser\", null);\n                if (actingUsername is null)\n                    return session.User;\n\n                User actingUser = _authManager.GetUser(actingUsername);\n                if (actingUser is null)\n                    throw new DnsWebServiceException(\"No such user exists: \" + actingUsername);\n\n                return actingUser;\n            }\n            else\n            {\n                if (standardOnly && (session.Type != UserSessionType.Standard))\n                    throw new DnsWebServiceException(\"Access was denied.\");\n\n                return session.User;\n            }\n        }\n\n        #endregion\n\n        #region tls\n\n        private void StartTlsCertificateUpdateTimer()\n        {","sourceCodeStart":2605,"sourceCodeEnd":2641,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/DnsWebService.cs#L2605-L2641","documentation":"DnsWebServiceException thrown by GetSessionUser when the session is a ClusterApiToken and the optional 'actingUser' query/form parameter names a user that _authManager.GetUser cannot find. Cluster nodes proxy calls with an acting user; if that user does not exist on this node, the call cannot be attributed and is rejected.","triggerScenarios":"A cluster API-token call includes ?actingUser=<name> where <name> is not a user on the receiving node. Happens when users were created on one node but not replicated/created on another, or the username is mistyped.","commonSituations":"User exists on the primary but not on a secondary (or vice versa); user was deleted while a cluster call was in flight; typo in actingUser; partial cluster sync; cross-cluster token misuse.","solutions":["Ensure the acting user exists on every cluster node (create/replicate the user).","Omit the actingUser parameter to act as the token's own user when appropriate.","Verify the username spelling/case in the request.","Re-sync cluster user data so all nodes agree on the user set."],"exampleFix":"null","handlingStrategy":"validation","validationCode":"// Before sending ?actingUser=, confirm the user exists on this node\nif (!string.IsNullOrEmpty(actingUser) && _authManager.GetUser(actingUser) is null)\n    throw new ArgumentException($\"Unknown acting user: {actingUser}\");","typeGuard":"null","tryCatchPattern":"catch (DnsWebServiceException ex) when (ex.Message.StartsWith(\"No such user exists\"))\n{\n    // create/replicate the user, or omit actingUser and retry\n}","preventionTips":["Keep the user set consistent across all cluster nodes.","Omit actingUser when the token's own user is acceptable.","Re-sync cluster user data after user create/delete operations."],"tags":["dns-server","technitium","auth","cluster","users","input-validation","csharp"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}