Dima ddk
Dima ddk

Reputation: 3

“An unhandled error has occurred.” when using Identity scaffold elements in a Blazor application

  1. Created a Blazor WebAssembly 3.2.0 Preview 3 application template using Individual User Accounts and the ASP.NET Core hosted parameter
  2. At this point, everything starts up correctly and the standard Blazor application is displayed.
  3. Added scaffold Registration and Login pages
  4. The application starts without errors, but the display template stops working and a message appears the message “An unhandled error has occurred".

Upvotes: 0

Views: 2252

Answers (1)

Xueli Chen
Xueli Chen

Reputation: 12685

From this github issue

The Identity scaffolder adds a wwwroot folder to the Server project with the default set of styles and other assets for the default Identity UI. These styles then override the styles that come from the Client project. In particular, both the Client and Server projects end up with a css/site.css.

You have the following two options:

  1. Change the name of site.css of wwwroot folder in Blazor Server project.

  2. Remove the wwwroot folder in Blazor Server project.

Upvotes: 1

Related Questions