Hi,
Sorry about the late reply.
I don't think we can solve the problem like this. If your problem still persists, we can schedule a meeting at a convenient time and look at it together. Is that okay with you?
Hi,
I created an application template with Angular UI from scratch but I didn't reproduce your problem.
If Impersonation permission is granted for the admin user, I can see the "Login with this tenant" button like above.
Can you also generate a new template from scratch? So, we can understand the problem is in ABP or your solution. If the problem is in your solution, we can only focus on your solution.
Opps! This suggestion worked for me at first, but it didn't work when I tried it again. Probably because I got a build on the last try, so I could see the problem. I apologize for the suggestion that didn't work.
As for your problem, I honestly can't find any other method. This is how Blazor Web App works and there is nothing to do about it. If you want it to render completely on the client side, you can use the Blazor Web Assembly template directly, but the first render time can take a long time. I know this situation is very annoying, but as I said, the problem is not caused by us, Blazor Web App works like this in itself.
I have changed as you advised and can fix the problem of loading menu but when open forms of the integrated modules it shown rendering error.
Oh, I see, yes, this render mode can cause such an error. Maybe we can make all components in App.Razor InteractiveAuto and pass the prerender parameter false like below. But then the user will not see anything until the Web Assembly side is loaded. This does not look good in terms of UX. However, there is nothing we can do in this case because Blazor UI works like this in itself. This is really annoying and I hope the .NET team will improve the working logic of Blazor.
<ExampleComponent @rendermode="new InteractiveAutoRenderMode(prerender: false)" />
Hi,
Changing the router's render mode to interactive server fixes it, but don't you want to do that?
<Routes @rendermode="InteractiveServer" /> // this line changed
Hi again,
After talking to my teammate, we realized that this is not a problem. This is how Blazor Web App works: dotnet/aspnetcore#52154 You can reproduce the same problem using a simple ASP.NET Blazor Web App Template. See GIF below:
Can you also send the Helm configurations of your public gateway application?
Hi Mariovh,
It works correctly, but if I load the application on a page that injects an IApplicationService, when the render mode is Server, it says that it is not registered.
Your last question seems quite different from the initial one. Can you create a separate question for this topic?
Thank you for your understanding.
Hi,
This issue doesn't seem to be related to us. Do you see the same errors when you try it in Chrome?
See more: https://github.com/dotnet/runtime/issues/98288
Hi,
I understand your problem and now I can reproduce it in ABP's startup template. I will create an internal issue related to the subject. In this process, you can apply the following method as a workaround solution.
Use InteractiveServer instead of InteractiveAuto for Routes component in MyApp.Blazor/Components/App.razor like below:
@using System.Globalization
@using Microsoft.Extensions.Hosting
@using Volo.Abp.AspNetCore.Components.Server.LeptonXTheme.Bundling
@using Volo.Abp.AspNetCore.Components.Server.LeptonXTheme.Components
@using Volo.Abp.Localization
@using Volo.Abp.AspNetCore.Components.Web.Theming.Bundling
@inject IHostEnvironment Env
@{
var rtl = CultureHelper.IsRtl ? "rtl" : string.Empty;
}
<!DOCTYPE html>
<html lang="@CultureInfo.CurrentCulture.Name" dir="@rtl">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>NewBlazorWebApp</title>
<base href="/" />
<AbpStyles BundleName="@BlazorLeptonXThemeBundles.Styles.Global" WebAssemblyStyleFiles="GlobalStyles" @rendermode="InteractiveAuto" />
<HeadOutlet @rendermode="InteractiveAuto" />
<AppearanceStyles/>
</head>
<body class="abp-application-layout @rtl">
<Routes @rendermode="InteractiveServer" /> // this line changed
<div id="blazor-error-ui">
@if (Env.IsDevelopment())
{
<text>An unhandled exception has occurred. See browser dev tools for details.</text>
}
else if (Env.IsStaging() || Env.IsProduction())
{
<text>An error has occurred. This application may no longer respond until reloaded.</text>
}
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<AbpScripts BundleName="@BlazorLeptonXThemeBundles.Scripts.Global" WebAssemblyScriptFiles="GlobalScripts" @rendermode="InteractiveAuto" />
<script src="_framework/blazor.web.js"></script>
</body>
</html>
@code{
private List<string> GlobalStyles =>
[
"global.css",
"main.css",
"blazor-global-styles.css"
];
private List<string> GlobalScripts =>
[
"global.js"
];
}