Open Closed

microservice-pro-template / missing functionlities on mvc and blazor app uis #4613


User avatar
0
mgurer created
  • ABP Framework version: v7.0.2
  • UI type: MVC & Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
  • Hi, I have just created two pro-microservice-projects using mvc and blazor pro templates and run the applications without any change.
  • The blazor and MVC version of the apps differs;
  • There is a payment left menu on MVC version and it is missing on blazor version. (I event tested with same database, two ui somehow differs)
  • On MVC version, security logs page is always empty without any data, and blazor version lists data.

I need to access payment menu on blazor app and I can't figure out what is the difference between two startup templates. I dont understand why mvc template does not show any security log line.

Can you help? Regards


9 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I will confirm that.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    There is a payment left menu on MVC version and it is missing on blazor version. (I event tested with same database, two ui somehow differs)

    You can add the abp payment blazor UI modules to your blazor app. we did it in the next release.

    On MVC version, security logs page is always empty without any data, and blazor version lists data.

    checking...

  • User Avatar
    0
    mgurer created

    I have added Volo.Payment.Admin.Blazor.WebAssembly to the Blazor project and made the module integration by adding AbpPaymentAdminBlazorWebAssemblyModule to dependson list.

    Now the payment menu is visible.

    The existing pages on the admin ui works fine until I click any link on payment menu. Clicking on payment menu opens an error popup and after that all other pages stops functioning.

    Can you confirm that?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Clicking on payment menu opens an error popup and after that all other pages stops functioning.

    what are error logs?

  • User Avatar
    0
    mgurer created

    global.js?_v=638052473678166900:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Cannot provide a value for property 'AppService' on type 'Volo.Payment.Admin.Blazor.Pages.Payment.Plans.PlanManagement'. There is no registered service of type 'Volo.Payment.Admin.Plans.IPlanAdminAppService'. System.InvalidOperationException: Cannot provide a value for property 'AppService' on type 'Volo.Payment.Admin.Blazor.Pages.Payment.Plans.PlanManagement'. There is no registered service of type 'Volo.Payment.Admin.Plans.IPlanAdminAppService'. at Microsoft.AspNetCore.Components.ComponentFactory.<>c__DisplayClass7_0.<CreateInitializer>g__Initialize|1(IServiceProvider serviceProvider, IComponent component) at Microsoft.AspNetCore.Components.ComponentFactory.PerformPropertyInjection(IServiceProvider serviceProvider, IComponent instance) at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateComponent(Type componentType) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame& frame, Int32 parentComponentId) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange1 oldTree, ArrayRange1 newTree) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException) at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry) at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    replace SaasHostHttpApiClientModule with SaasServiceHttpApiClientModule.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    On MVC version, security logs page is always empty without any data, and blazor version lists data.

    Found the reason. Will fix it soon.

  • User Avatar
    0
    mgurer created

    Hi,

    Payment module works fine with your latest instructions.

    Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    On MVC version, security logs page is always empty without any data, and blazor version lists data.

    Temporary code that fixes the problem, we'll fix it in the framework.

    MyProjectNameWebModule

    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.Replace(ServiceDescriptor.Transient<IAbpServiceConvention, MyAbpHttpClientProxyServiceConvention>());
        context.Services.AddTransient<MyAbpHttpClientProxyServiceConvention>();
    }
    
    using System.Collections.Generic;
    using System.Threading.Tasks;
    using Microsoft.AspNetCore.Mvc;
    using Microsoft.AspNetCore.Mvc.ApplicationModels;
    using Microsoft.Extensions.Options;
    using Volo.Abp.Account;
    using Volo.Abp.Account.ClientProxies;
    using Volo.Abp.Application.Dtos;
    using Volo.Abp.AspNetCore.Mvc;
    using Volo.Abp.AspNetCore.Mvc.Conventions;
    using Volo.Abp.DependencyInjection;
    using Volo.Abp.Http.Client.ClientProxying;
    using Volo.Abp.Http.Client.Web.Conventions;
    using Volo.Abp.Identity;
    using Volo.Abp.Identity.ClientProxies;
    
    namespace MyCompanyName.MyProjectName.Web;
    
    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(MyIdentitySecurityLogClientProxy), typeof(IIdentitySecurityLogAppService), typeof(IdentitySecurityLogClientProxy))]
    public class MyIdentitySecurityLogClientProxy : IdentitySecurityLogClientProxy
    {
        public async override Task<PagedResultDto<IdentitySecurityLogDto>> GetListAsync([FromQuery]GetIdentitySecurityLogListInput input)
        {
            return await RequestAsync<PagedResultDto<IdentitySecurityLogDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
            {
                { typeof(GetIdentitySecurityLogListInput), input }
            });
        }
    
        public async override Task<PagedResultDto<IdentitySecurityLogDto>> GetMyListAsync([FromQuery]GetIdentitySecurityLogListInput input)
        {
            return await RequestAsync<PagedResultDto<IdentitySecurityLogDto>>(nameof(GetMyListAsync), new ClientProxyRequestTypeValue
            {
                { typeof(GetIdentitySecurityLogListInput), input }
            });
        }
    }
    
    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(MyAccountClientProxy), typeof(IAccountAppService), typeof(AccountClientProxy))]
    public class MyAccountClientProxy : AccountClientProxy
    {
        public async override Task<PagedResultDto<IdentitySecurityLogDto>> GetSecurityLogListAsync([FromQuery]GetIdentitySecurityLogListInput input)
        {
            return await RequestAsync<PagedResultDto<IdentitySecurityLogDto>>(nameof(GetSecurityLogListAsync), new ClientProxyRequestTypeValue
            {
                { typeof(GetIdentitySecurityLogListInput), input }
            });
        }
    }
    
    
    [DisableConventionalRegistration]
    public class MyAbpHttpClientProxyServiceConvention : AbpHttpClientProxyServiceConvention
    {
        public MyAbpHttpClientProxyServiceConvention(
            IOptions<AbpAspNetCoreMvcOptions> options,
            IConventionalRouteBuilder conventionalRouteBuilder,
            IClientProxyApiDescriptionFinder clientProxyApiDescriptionFinder)
            : base(options, conventionalRouteBuilder, clientProxyApiDescriptionFinder)
        {
    
        }
    
        protected override void ApplyForControllers(ApplicationModel application)
        {
            application.Controllers.RemoveAll(x => x.ControllerName == "IdentitySecurityLogClientProxy");
            application.Controllers.RemoveAll(x => x.ControllerName == "AccountClientProxyClientProxy");
            base.ApplyForControllers(application);
        }
    }
    
    
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11