Activities of "maliming"

hi

Can you try to remove [RemoteService(false)] and add MyAbpHttpClientProxyServiceConvention to your Blazor project?

public override void ConfigureServices(ServiceConfigurationContext context)
{
    context.Services.Replace(ServiceDescriptor.Transient<IAbpServiceConvention, MyAbpHttpClientProxyServiceConvention>());
    context.Services.AddTransient<MyAbpHttpClientProxyServiceConvention>();
}
using System.Linq;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Conventions;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Client.StaticProxying;
using Volo.Abp.Http.Client.Web.Conventions;
using Volo.Abp.Http.Modeling;
using Volo.Abp.Reflection;

namespace SEF.Blazor;

public class MyAbpHttpClientProxyServiceConvention : AbpHttpClientProxyServiceConvention
{
    public MyAbpHttpClientProxyServiceConvention(
        IOptions<AbpAspNetCoreMvcOptions> options,
        IConventionalRouteBuilder conventionalRouteBuilder,
        IClientProxyApiDescriptionFinder clientProxyApiDescriptionFinder,
        IOptions<AbpHttpClientStaticProxyingOptions> staticProxyingOptions)
        : base(options, conventionalRouteBuilder, clientProxyApiDescriptionFinder, staticProxyingOptions)
    {
    }

    protected override ActionApiDescriptionModel? FindActionApiDescriptionModel(ControllerModel controller, ActionModel action)
    {
        var appServiceType = FindAppServiceInterfaceType(controller);
        if (appServiceType == null)
        {
            return null;
        }

        var key =
            $"{appServiceType.FullName}." +
            $"{action.ActionMethod.Name}." +
            $"{string.Join("-", action.Parameters.Select(x => TypeHelper.GetFullNameHandlingNullableAndGenerics(x.ParameterType)))}";

        var actionApiDescriptionModel = ClientProxyApiDescriptionFinder.FindAction(key);
        if (actionApiDescriptionModel == null)
        {
            return null;
        }

        return actionApiDescriptionModel;
        
        // if (actionApiDescriptionModel.ImplementFrom!.StartsWith("Volo.Abp.Application.Services"))
        // {
        //     return actionApiDescriptionModel;
        // }

        // if (appServiceType.FullName != null && actionApiDescriptionModel.ImplementFrom.StartsWith(appServiceType.FullName))
        // {
        //     return actionApiDescriptionModel;
        // }

        // return null;
    }
}

Can you share the screenshots of the response headers and body?

eg:

Thanks.

hi

I will provide a solution soon.

Thanks.

😉

hi

I have downloaded your projects. can you also share the steps?

Thanks.

hi

Can you add your test code to a new template project and share it?

Thanks.

hi

Can you share the steps or project that I can reproduce this exception?

liming.ma@volosoft.com

Thanks.

hi

Can you share two simple projects to reproduce the 401 error?

liming.ma@volosoft.com

Thanks.

hi

All projects should get a token from the Auth Server.

And the token will be validated by Auth Server website.


Will all your projects use the same identity users database?

Thanks.

Answer

我已经在framework中优化了这个方法

参考: https://github.com/abpframework/abp/pull/23622

Showing 1061 to 1070 of 11567 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 25, 2025, 06:16
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.