Activities of "duyan11110"

But I still don't understand how each service can call right API to get data. Now I have the menu like this: Service A User Service B User

Please pay attention that all UI are hosted in Web project. When user click in User menu in each service, but it's the same URL, how ABP understand to navigate to different APIs of each service?

OK, let's use Identity module as an example. Now I want to use this module in 2 services concurently. As my understanding, all tables of Identity module will be created in database of each service. Right?

But the code to manage all those tables is located in Identity module. So how to reuse UI in Indentity module and get correct data of Identity module for each service? It means each service will have the same UI, just different data.

That is the problem I'm facing. Please show me your solution to reuse Identity module.

Hi,

In HttpApi I don't have any controller that implement the app service mannualy. The controllers are generated automatically by conventional controllers configured as my previous comment. Do I need to add HttpApi?

For your better suggestion. If I change my code like this:

public class CustomStaticDataTypeAppService : StaticDataTypeAppService, IStaticDataTypeAppService
{
    public CustomStaticDataTypeAppService(IStaticDataTypeRepository staticDataTypeRepository, IStaticDataStructureRepository staticDataStructureRepository, IEmployeeRepository employeeRepository, IStringLocalizer<BaseComponentResource> baselocalizer) : base(staticDataTypeRepository, staticDataStructureRepository, employeeRepository, baselocalizer)
    {
    }
}

It means, if I don't use ICustomStaticDataTypeAppService, use IStaticDataTypeAppService directly, javascript proxy is generate normally. But the problem is APIs will be the same name because it use the same interface, so other services will call wrong APIs of a certain service.

I already configured conventional controller like this but it didn't help:

Configure<AbpAspNetCoreMvcOptions>(options =>
{
    options.ConventionalControllers
        .Create(typeof(AMLReportServiceApplicationModule).Assembly, opts =>
        {
            opts.RootPath = AMLReportServiceRemoteServiceConsts.ModuleName;
            opts.RemoteServiceName = AMLReportServiceRemoteServiceConsts.RemoteServiceName;
        });
});

I have a module named BaseComponent with following AppService:

public interface IStaticDataTypeAppService : IApplicationService
    {
        Task<LoadResult> GetListAsync(DataSourceLoadOptionsCustomized options);
        Task<BaseComponentResponseDto> BatchUpdateAsync(List<DXBatchUpdate> changes);
        Task<StaticDataTypeViewDto?> GetNameByCodeAsync(string code);
    }
    
public class StaticDataTypeAppService : BaseComponentAppService, IStaticDataTypeAppService
    {
        private readonly IStaticDataTypeRepository _staticDataTypeRepository;
        private readonly IStaticDataStructureRepository _staticDataStructureRepository;
        private readonly IEmployeeRepository _employeeRepository;
        private readonly IStringLocalizer<BaseComponentResource> _baseLocalizer;

        public StaticDataTypeAppService(
            IStaticDataTypeRepository staticDataTypeRepository,
            IStaticDataStructureRepository staticDataStructureRepository,
            IEmployeeRepository employeeRepository,
            IStringLocalizer<BaseComponentResource> baselocalizer
        )
        {
            _staticDataTypeRepository = staticDataTypeRepository;
            _staticDataStructureRepository = staticDataStructureRepository;
            _employeeRepository = employeeRepository;
            _baseLocalizer = baselocalizer;
        }
        
        ...
    }

I use this module in AMLReportService as following:

public interface ICustomStaticDataTypeAppService : IStaticDataTypeAppService
{
}

public class CustomStaticDataTypeAppService : StaticDataTypeAppService, ICustomStaticDataTypeAppService
{
    public CustomStaticDataTypeAppService(IStaticDataTypeRepository staticDataTypeRepository, IStaticDataStructureRepository staticDataStructureRepository, IEmployeeRepository employeeRepository, IStringLocalizer<BaseComponentResource> baselocalizer) : base(staticDataTypeRepository, staticDataStructureRepository, employeeRepository, baselocalizer)
    {
    }
}

The purpose that I have to create Custom AppService for IStaticDataTypeAppService is: this module will be used in multiple services, so all of its APIs need to be renamed.

In AMLReportService swagger, I can see custom APs and work fine:

Static C# proxy is also generated normally as following:

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ICustomStaticDataTypeAppService), typeof(CustomStaticDataTypeClientProxy))]
public partial class CustomStaticDataTypeClientProxy : ClientProxyBase<ICustomStaticDataTypeAppService>, ICustomStaticDataTypeAppService
{
    public virtual async Task<LoadResult> GetListAsync(DataSourceLoadOptionsCustomized options)
    {
        return await RequestAsync<LoadResult>(nameof(GetListAsync), new ClientProxyRequestTypeValue
        {
            { typeof(DataSourceLoadOptionsCustomized), options }
        });
    }

    public virtual async Task<BaseComponentResponseDto> BatchUpdateAsync(List<DXBatchUpdate> changes)
    {
        return await RequestAsync<BaseComponentResponseDto>(nameof(BatchUpdateAsync), new ClientProxyRequestTypeValue
        {
            { typeof(List<DXBatchUpdate>), changes }
        });
    }

    public virtual async Task<StaticDataTypeViewDto> GetNameByCodeAsync(string code)
    {
        return await RequestAsync<StaticDataTypeViewDto>(nameof(GetNameByCodeAsync), new ClientProxyRequestTypeValue
        {
            { typeof(string), code }
        });
    }
}

But in client side, in ServiceProxyScript, I can't find those APIs, I don't know why it's not generated (Only APIs in BaseComponent module are not generated, other APIs in AMLReportService are generated normally). Please help.

Hi,

So, when dynamic claim is called? Every 1 hour?

Hi,

I fixed this issue by adding this code in WebModule to change Dynamic Claim URL for internal call in K8s

context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
    options.IsDynamicClaimsEnabled = true;
    options.RemoteRefreshUrl = configuration["AuthServer:MetadataAddress"] + options.RemoteRefreshUrl.Replace(configuration["AuthServer:Authority"],""); --> ADDED THIS LINE
});

But can you explain why dynamic claim impact to Access Token lifetime?

Hi,

Already sent identitymodel.txt. Please check.

Hi,

Please check the logs I've sent to your email. After 1 hour, I access to another page and see this in Web log:

[10:13:25 INF] Sending HTTP request POST https://authserver.upgrade-staging.mizuho.vn/api/account/dynamic-claims/refresh

and K8s can not understand the domain (it should be http://authserver-upgrade-staging/api/account/dynamic-claims/refresh for internal call). In localhost, access token is still valid more than 1 hour

Hi,

I've sent the logs. Please check.

Showing 1 to 10 of 91 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
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 10, 2025, 12:02
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.