Reputation: 912
I have a .Net 6 Blazor server side app. The app has an error
Error: There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details turn on detailed exceptions by setting 'DetailedErrors: true' in 'appSettings.Development.json' or set 'CircuitOptions.DetailedErrors'.
I have tried setting the CircuitOptions.DetailedErrors = true.
I have ensured I am in Debug mode, i.e. the Environment.IsDevelopment switch is set to true.
Program.cs
if (builder.Environment.IsDevelopment())
{
builder.Services.AddServerSideBlazor().AddCircuitOptions(x => x.DetailedErrors = true);
}
else
{
builder.Services.AddServerSideBlazor();
}
and I have set 'DetailedErrors: true'in appSettings.Developmnet.json and appSettings.json.
"AppSettings": {
"DetailedErrors": true,
However this has not affected the error message in anyway.
I am still am unable to get the detailed error message.
Any ideas on what else to try?
Upvotes: 0
Views: 2456
Reputation: 1133
Please make that the appsettings.production.json
file is populating with the same flags in the publishing folder path. This happens normally when appsettings.json is different from appsettings.{Environment}.json
file.
Upvotes: 1