Starts in:
0 DAY
18 HRS
3 MIN
35 SEC
Starts in:
0 D
18 H
3 M
35 S
Open Closed

How to override ABP API Controller (AbpApplicationConfigurationController) #8085


User avatar
0
sairam.thirupathuru created
  • ABP Framework version: Latest I am trying to override the GetAsync methods of the AbpApplicationConfigurationController but I am having issues. I am getting 502 Undocumented Error: Bad Gateway Could you please help me out

9 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    can you please share logs?

    Please check out https://abp.io/docs/latest/framework/architecture/modularity/extending/customizing-application-modules-overriding-services?_redirected=B8ABF606AA1BDF5C629883DF1061649A#example-overriding-a-controller

    Thanks,

  • User Avatar
    0
    sairam.thirupathuru created

    Hello Anjali, I tried the same way but no luck. Could you please let me know how to upload Logs.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    There is a logs folder under the host project. Please check the error in that and share it with me.

  • User Avatar
    0
    sairam.thirupathuru created

    No error in the logs. but how can I share it since it's large in size?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    Please check this simila issue https://abp.io/support/questions/5961/Application-Configuration-API-Endpoint if it helps you.

    Thanks,

  • User Avatar
    0
    sairam.thirupathuru created

    Hi Anjali, I gone thought the above URL, Still, I am getting 502 Undocumented Error: Bad Gateway

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    HI,

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

    shiwei.liang@volosoft.comr

  • User Avatar
    0
    sairam.thirupathuru created

    Hello Liang Shiwei,

    I have provided all the code screenshots. Please let me know exactly what you are looking for.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can't reproduce this problem.

    My steps

    • abp new Testapp
    • Run DbMigrator
    • Add CustomApplicationConfigurationController to the HttpApi project
    [RemoteService(true, Name ="abp")]
    [Route("api/abp/application-configuration")]
    [ControllerName("AbpApplicationConfigurationController")]
    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(AbpApplicationConfigurationController))]
    [Area("abp")]
    public class CustomApplicationConfigurationController : AbpApplicationConfigurationController, IAbpApplicationConfigurationAppService
    {
        public CustomApplicationConfigurationController(IAbpApplicationConfigurationAppService applicationConfigurationAppService, IAbpAntiForgeryManager antiForgeryManager) : base(applicationConfigurationAppService, antiForgeryManager)
        {
        }
    
        public async override Task<ApplicationConfigurationDto> GetAsync(ApplicationConfigurationRequestOptions options)
        {
            var result  = await base.GetAsync(options);
    
            result.ExtraProperties.Add("customProperty", "customValue");
    
            return result;
        }
    }
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06