Table of Contents
.Net 5.x
I'm getting this message in the console when running a Blazor Server app:
This article will allow you to see the errors in the browser console with ASP.NET Core Blazor 5.x(Server-side).
Blazor error handling documentation
https://docs.microsoft.com/en-us/aspnet/core/blazor/fundamentals/handle-errors?view=aspnetcore-5.0
1.How to Turn on Blazor Server detailed circuit errors
You will getting this message in the browser console when running a server-side Blazor app:
step 1:Add an IWebHostEnvironment property
In your Startup.cs file you'll need to add an IWebHostEnvironment property to the Startup class. You'll also need to adjust the constructor to accept one.
Step 2:Add the Circuit Options
Next add the Circuit Options to the ConfigureServices method that already exists.This change will allow you to see the errors in the browser console.
Now the console in your web browser should give you a better error message!
1.How to Turn on Detailed Exceptions in CircuitOptions.DetailedErrors with Blazor
https://mattferderer.com/detailed-exceptions-circuitoptions-blazor
.Net core 3.x
I'm getting this message in the console when running a server-side Blazor app:
This article will allow you to see the errors in the browser console with ASP.NET Core Blazor 3.x(Server-side).
Blazor error handling documentation
https://docs.microsoft.com/en-us/aspnet/core/blazor/handle-errors?view=aspnetcore-3.0
1.How to Turn on Detailed Exceptions in CircuitOptions.DetailedErrors with Blazor
You will getting this message in the browser console when running a server-side Blazor app:
In your Startup.cs file you'll need to add an IWebHostEnvironment property to the Startup class. You'll also need to adjust the constructor to accept one.
Next add the Circuit Options to the ConfigureServices method that already exists.This change will allow you to see the errors in the browser console.
Now the console in your web browser should give you a better error message!
.Net 8.x
appsettings.Development.json:
https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/handle-errors?view=aspnetcore-8.0
1.How to Turn on Detailed Exceptions in CircuitOptions.DetailedErrors with Blazor
https://mattferderer.com/detailed-exceptions-circuitoptions-blazor