Open Closed

Need to Add Additional Controller to Identity Service/Module #1333


User avatar
0
viswajwalith created
  • ABP Framework version: v4.3
  • UI type: MVC
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes (Micro Service Template)
  • Exception message and stack trace:
  • Steps to reproduce the issue:

We would like to add additional controler to the Identity Service/Module in Micro Service based architecture, We have added the required files across layers but still not able to see that controler and method exposed. Can you please guilde to handle this scenrio.

Let me know if you need additional info.


2 Answer(s)
  • User Avatar
    0
    alper created
    Support Team Director

    do you see it in Swagger UI? here's a sample controller

        [RemoteService(Name = "AbpIdentity")]
        [Area("identity")]
        [ControllerName("User")]
        [Route("api/identity/users")]
        public class IdentityUserController : AbpController, IIdentityUserAppService
        {
            [HttpGet]
            [Route("{id}")]
            public virtual Task<IdentityUserDto> GetAsync(Guid id)
            {
                return UserAppService.GetAsync(id);
            }
        }
        
    
  • User Avatar
    0
    viswajwalith created

    do you see it in Swagger UI? here's a sample controller

        [RemoteService(Name = "AbpIdentity")] 
        [Area("identity")] 
        [ControllerName("User")] 
        [Route("api/identity/users")] 
        public class IdentityUserController : AbpController, IIdentityUserAppService 
        { 
            [HttpGet] 
            [Route("{id}")] 
            public virtual Task<IdentityUserDto> GetAsync(Guid id) 
            { 
                return UserAppService.GetAsync(id); 
            } 
        } 
         
    

    Thanks, actually we made big mistake, missed to add "Public" to our controller.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38