I have this component :
@using Models@using Microsoft.AspNetCore.Identity@inject SignInManager<AccountUser> SignInManager@inject NavigationManager Navigation@rendermode InteractiveServer<div class="d-flex flex-column flex-shrink-0 p-3 bg-light " style="width: 260px;overflow: auto;"><a href="/" class="text-decoration-none"><div><img src="images/logo.png" style="width:200px;" /></div></a><hr /><button class="btn btn-link align-items-center link-dark text-decoration-none" @onclick="LogoutUser" style="padding: 0; border: none; background: none;"><i class="bi bi-door-closed"></i> Logout</button></div>@code { private async Task LogoutUser() { await SignInManager.SignOutAsync(); Navigation.NavigateTo("/login", true); }}When I'm clicking on the Logout button , nothing happens, the private async Task LogoutUser() is not triggered.
I tried to add @rendermode InteractiveServer, same issue.
When I'm using "<Routes @rendermode="InteractiveServer" />" in App.razor :
I got this error message :
InvalidOperationException: There is already a subscriber to thecontent with the given section ID 'System.Object'.Microsoft.AspNetCore.Components.Sections.SectionRegistry.Subscribe(objectidentifier, SectionOutlet subscriber)
I tried many solutions related to this kind of issue that I found in stackoverflow, but nothing works for me.