dotnet/orleans · error · OrleansConfigurationException
Invalid {nameof(AdoNetReminderTableOptions)} values for {nam
Error message
Invalid {nameof(AdoNetReminderTableOptions)} values for {nameof(AdoNetReminderTable)}. {nameof(options.Invariant)} is required. What it means
Thrown by the ADO.NET reminders options validator when Invariant is null or whitespace. AdoNetReminderTableOptions.Invariant has no default, so it must be set explicitly for the reminder service to know which database driver and query dialect to use.
Source
Thrown at src/AdoNet/Orleans.Reminders.AdoNet/ReminderService/AdoNetReminderTableOptionsValidator.cs:24
{
/// <summary>
/// Validates <see cref="AdoNetReminderTableOptions"/> configuration.
/// </summary>
public class AdoNetReminderTableOptionsValidator : IConfigurationValidator
{
private readonly AdoNetReminderTableOptions options;
public AdoNetReminderTableOptionsValidator(IOptions<AdoNetReminderTableOptions> options)
{
this.options = options.Value;
}
/// <inheritdoc />
public void ValidateConfiguration()
{
if (string.IsNullOrWhiteSpace(this.options.Invariant))
{
throw new OrleansConfigurationException($"Invalid {nameof(AdoNetReminderTableOptions)} values for {nameof(AdoNetReminderTable)}. {nameof(options.Invariant)} is required.");
}
if (string.IsNullOrWhiteSpace(this.options.ConnectionString) == (this.options.DataSource is null))
{
throw new OrleansConfigurationException($"Invalid {nameof(AdoNetReminderTableOptions)} values for {nameof(AdoNetReminderTable)}. Configure exactly one of {nameof(options.ConnectionString)} or {nameof(options.DataSource)}.");
}
}
}
}View on GitHub (pinned to fca799fa70)
Solutions
- Set options.Invariant = AdoNetInvariants.InvariantNameSqlServer (or the relevant driver).
- Use the UseAdoNetReminders overload that accepts a configure delegate and set Invariant there.
- Ensure the reminders section in appsettings.json contains an Invariant key.
Example fix
// before
builder.UseAdoNetReminders(o =>
{
o.ConnectionString = "Server=.;Database=Orleans;";
});
// after
builder.UseAdoNetReminders(o =>
{
o.Invariant = AdoNetInvariants.InvariantNameSqlServer;
o.ConnectionString = "Server=.;Database=Orleans;";
}); Defensive patterns
Strategy: validation
Validate before calling
static void CheckReminderInvariant(AdoNetReminderTableOptions o)
{
if (string.IsNullOrWhiteSpace(o.Invariant))
throw new InvalidOperationException("AdoNetReminderTableOptions.Invariant is required.");
} Prevention
- Set Invariant explicitly for reminders — it has no default.
- Reference AdoNetInvariants constants to avoid typos.
- Add a config test asserting the reminders Invariant is non-blank.
When it happens
Trigger: ValidateConfiguration() runs on AdoNetReminderTableOptions with a blank Invariant. Triggered at host startup when UseAdoNetReminders is registered without setting Invariant.
Common situations: Registering reminders with only a connection string; assuming the reminder table shares the clustering Invariant; copy-paste from storage config that has a default Invariant.
Related errors
- Invalid {nameof(AdoNetGrainDirectoryOptions)} values for {na
- Invalid {nameof(AdoNetGrainStorageOptions)} values for {name
- Invalid {nameof(AdoNetReminderTableOptions)} values for {nam
- Invalid {nameof(AdoNetStreamOptions)} values for ADO.NET Str
- Invalid {nameof(AdoNetClusteringSiloOptions)} values for {na
AI-assisted analysis of dotnet/orleans@fca799fa70 (2026-08-13).
Data as JSON: /api/errors/270452afec3bf255.
Report an issue: GitHub.