Open Closed

Menu non visualizzato dopo l'accesso #7599


User avatar
0
g.maldarelli created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:

  • ABP Framework version: v8.1.3
  • UI Type: Blazor WASM
  • Database System: MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: N/A
  • Steps to reproduce the issue: Azure Web App deployments

Good morning, I deployed an ABP solution as indicated. The theme used is Lepton (Standard Left SIde Menu) The solution is up and run but when I log in, the menu is empty (only Home) to see the menu I am forced to perform a refresh. I read that many have had this problem but it is not clear to me if it has been solved and how it was solved. Can you help me? in this way I cannot present it to the customer and it is creating delays on the project deadlines

Best Regards Giuseppe


7 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    HI,

    could you share the full logs?

  • User Avatar
    0
    g.maldarelli created

    i have a static web app on azure for UI a Web App for the api a Web App for the AuthServer

    here the zip archive of the logs https://we.tl/t-dgwiOnOiag (expire in 3 days)

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    could you try this:

    Add MyAuthentication.razor to the Blazor project.

    @page "/authentication/{action}"
    @using Microsoft.AspNetCore.Components.WebAssembly.Authentication
    <RemoteAuthenticatorView Action="@Action"  OnLogInSucceeded="OnLogInSucceeded" OnLogOutSucceeded="OnLogOutSucceeded"/>
    @inject WebAssemblyCachedApplicationConfigurationClient WebAssemblyCachedApplicationConfigurationClient
    
    @inherits Authentication
    @attribute [ExposeServices(typeof(Authentication))]
    @attribute [Dependency(ReplaceServices = true)]
    
    @code{
        [Parameter] public string Action { get; set; }
    
        private async Task OnLogInSucceeded(RemoteAuthenticationState obj)
        {
            await WebAssemblyCachedApplicationConfigurationClient.InitializeAsync();
        }
        private async Task OnLogOutSucceeded(RemoteAuthenticationState obj)
        {
            await WebAssemblyCachedApplicationConfigurationClient.InitializeAsync();
        }
    }
    
    
  • User Avatar
    0
    g.maldarelli created

    Hi, the custom razor geerate an routes are ambiguous problem. here the log:

    crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: The following routes are ambiguous: 'authentication/{action}' in 'IBLTermocasa.Blazor.Pages.CustomAuthentication' 'authentication/{action}' in 'Volo.Abp.AspNetCore.Components.WebAssembly.LeptonTheme.Pages.Authentication'

    System.InvalidOperationException: The following routes are ambiguous: 'authentication/{action}' in 'IBLTermocasa.Blazor.Pages.CustomAuthentication' 'authentication/{action}' in 'Volo.Abp.AspNetCore.Components.WebAssembly.LeptonTheme.Pages.Authentication'

    at Microsoft.AspNetCore.Components.RouteTableFactory.DetectAmbiguousRoutes(TreeRouteBuilder builder) at Microsoft.AspNetCore.Components.RouteTableFactory.Create(Dictionary2 templatesByHandler, IServiceProvider serviceProvider) at Microsoft.AspNetCore.Components.RouteTableFactory.Create(List1 componentTypes, IServiceProvider serviceProvider) at Microsoft.AspNetCore.Components.RouteTableFactory.Create(RouteKey routeKey, IServiceProvider serviceProvider) at Microsoft.AspNetCore.Components.Routing.Router.RefreshRouteTable() at Microsoft.AspNetCore.Components.Routing.Router.Refresh(Boolean isNavigationIntercepted) at Microsoft.AspNetCore.Components.Routing.Router.RunOnNavigateAsync(String path, Boolean isNavigationIntercepted) at Microsoft.AspNetCore.Components.Routing.Router.<>c__DisplayClass76_0.<RunOnNavigateAsync>b__1(RenderTreeBuilder builder)

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    sorry, remove @page "/authentication/{action}"

  • User Avatar
    0
    g.maldarelli created

    No change, exactly the same behavior. the menu doesn't appear without a refresh

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    could you please share a minimal reproducible project with me? i will check it.

    shiwei.liang@volosoft.com

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35