TechnitiumSoftware/DnsServer · warning · ArgumentException
Group description length cannot exceed 255 characters.
Error message
Group description length cannot exceed 255 characters.
What it means
Thrown by the Group.Description setter when a non-whitespace value longer than 255 characters is supplied. Whitespace-only values are normalized to empty string, so only a genuinely long description triggers it. It is an ArgumentException enforcing the configured storage width.
Source
Thrown at DnsServerCore/Auth/Group.cs:134
case "dhcp administrators":
throw new InvalidOperationException("Access was denied.");
default:
_name = value;
break;
}
}
}
public string Description
{
get { return _description; }
set
{
if (string.IsNullOrWhiteSpace(value))
_description = "";
else if (value.Length > 255)
throw new ArgumentException("Group description length cannot exceed 255 characters.", nameof(Description));
else
_description = value;
}
}
#endregion
}
}
View on GitHub (pinned to d0484b6c1e)
Solutions
- Shorten the description to <= 255 characters.
- Enforce a client-side maxlength and server-side validation on the description field.
- Store longer prose in a separate notes/documentation attribute if available.
Example fix
// before
group.Description = description;
// after
if (!string.IsNullOrWhiteSpace(description) && description.Length > 255)
description = description.Substring(0, 255);
group.Description = description; Defensive patterns
Strategy: validation
Validate before calling
if (!string.IsNullOrWhiteSpace(description) && description.Length > 255)
description = description.Substring(0, 255);
group.Description = description; Try / catch
try { group.Description = description; }
catch (ArgumentException ex) when (ex.ParamName == "Description")
{ return BadRequest(ex.Message); } Prevention
- Set a maxlength on the description input in the UI.
- Trim or truncate long descriptions before assigning.
- Validate length server-side.
When it happens
Trigger: Assigning Group.Description = text where text is longer than 255 chars (and not whitespace-only).
Common situations: Pasting a long help/policy document into the description field; a UI without a maxlength; a migration that maps a verbose legacy field into Description.
Related errors
- Group name length cannot exceed 255 characters.
- The SSO Authority URL length cannot be more than 255 chars.
- The SSO Client ID length cannot be more than 255 chars.
- The SSO Client Secret length cannot be more than 255 chars.
- The SSO Metadata Address URL length cannot be more than 255
AI-assisted analysis of TechnitiumSoftware/DnsServer@d0484b6c1e (2026-08-13).
Data as JSON: /api/errors/4a36f9230f73b4e6.
Report an issue: GitHub.