Hi @Robert T
that's two layout files containing your <html> <head> <body> tags.. surely they should only be in one? I can't move my navigation menus into _layout.cshtml as it doesn't support blazor components such as NavLink, NavMatch etc..
Since ASP.NET Core abstractions, such as SignInManager<TUser> and UserManager<TUser>, aren't supported in Razor components. In Blazor Server apps, authentication uses the same ASP.NET Core Identity authentication as Razor Pages and MVC apps. So there have two kind of layout pages, one for Identity Razor pages, one for Balzor components. Like this:
So, when running the web site, it is clear to find that the Identity page (such as login page) will using different Layout.
If you want to use the same Layout, you can create the Login/Logout components by yourself, instead of using Asp.net core identity, refer to this tutorial: A Demonstration of Simple Server-side Blazor Cookie Authentication.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion