I have a blazor web app (server based) with page components defined parametrically as below:
@page "/System/{iSysnum:int?}"
@page "/System/{iSysnum:int?}"
@implements IDisposable
@rendermode InteractiveServer
@page "/System/{iSysnum:int?}"
...
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize]
I have added authentication in program.cs as follows:
builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(options =>
{
builder.Configuration.Bind("AzureAdB2C", options);
});
After successful log in in the web app, the pages /system/1, /system/2, ... become available and I can navigate to any one (/system/n). But when I navigate to a different page (/system/m) , only the heading text is updated but presented data are still from previous system. The system data gets updated when refresh the browser, but it is not the desired behavior...
P.S. The web app did update data for each system when navigating between pages before implementing the B2C authorization.