Hi
I create amazingly simple program: GitHub - gbbsoft/BlazorApp_Radzen
I did everything from: GitHub
When I try press:
Nothing happened. Why? Could anyone check it?
Hi
I create amazingly simple program: GitHub - gbbsoft/BlazorApp_Radzen
I did everything from: GitHub
When I try press:
Nothing happened. Why? Could anyone check it?
You’ve missed * <RadzenComponents/>
Ah, I’ve missed it. You can check also this thread:
Change from:
<RadzenComponents />
to:
<RadzenDialog @rendermode="RenderMode.InteractiveServer"></RadzenDialog>
<RadzenNotification @rendermode="RenderMode.InteractiveServer"></RadzenNotification>
helps.
I think you should add it to GitHub
Also change:
builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
to
builder.Services.AddSingleton(sp =>
{
// Get the address that the app is currently running at
var server = sp.GetRequiredService<IServer>();
var addressFeature = server.Features.Get<IServerAddressesFeature>();
string baseAddress = addressFeature!.Addresses.First();
return new HttpClient { BaseAddress = new Uri(baseAddress) };
});
Maybe you should add this to your layout or the even globally - you will certainly need other interactive components in your application.
I can't change it globally because Microsoft Account module is SSR and is using NavigationManager which doesn't work in InteractiveServer mode.
That's not true, definitely works.
From IdentityRedirectManager I called RedirectToCurrentPage and I received error: IdentityRedirectManager can only be used during static rendering.
PS. Not "NavigationManager" but "IdentityRedirectManager"
Both have nothing in common. You might want to check how Radzen Blazor Studio handles security with .NET Identity - we are using plain Redirect().