Hurry Up, Ends March 14!
Open Closed

Module 'volo/abp/identity/models' has no exported member 'IdentityUserDto'. #8943


User avatar
0
dfzamora created
  • ABP Framework version: v8.2.3

  • UI Type: Angular

  • Database System: EF Core (SQL Server)

  • Tiered (for MVC) or Auth Server Separated (for Angular): no

  • Exception message and full stack trace:

  • Steps to reproduce the issue:

Hello, I have followed the information provided here to override a service/controller https://abp.io/docs/8.2/framework/architecture/modularity/extending/customizing-application-modules-overriding-services

After overriding AccountService, when I run proxy to create services (in the frontend), I receive the error Module '"../../volo/abp/identity/models"' has no exported member 'IdentityUserDto'.
I have tried to replace the service like that
image.png

I also tried redefining the controller
image.png
However, if I include a new method in the controller, this is not recognized by the proxy, am I missing something?


5 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi,

    Do you use generating client proxies command without contracts ?

    https://abp.io/docs/latest/framework/api-development/static-csharp-clients#without-contracts

  • User Avatar
    0
    dfzamora created

    Hello,

    Not at all, I do generate client proxies using the command abp generate-proxy -t ng -u https://localhost:44388 should I use without contracts? I have never used that flag in all my abp projects, I am not aware of the impact it could have

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Ok, here is the possible reasons of the problem.You don't pass any module parameter -m and it's app by default.

    Since the newly created classes included in your namespace, they started to be included in the app namespace.

    Can you try adding the following attributes to your overriden Controller?

    [Route("api/account")]
    [Area("account")]
    

    If Auto API Controllers is enabled in your project, your app service probably will be exposed as a controller still.

    You can add RemoteService(IsEnabled = false)] attribute to your AppService too

    [RemoteService(IsEnabled = false)]
    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(IAccountAppService), typeof(AccountAppService), typeof(CustomAccountAppService))]
    public class CustomAccountAppService : AccountAppService
    
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    If you wish to create client-proxy for Account module, you can still pass -m account parameter for generating client-proxy.

  • User Avatar
    0
    dfzamora created

    [RemoteService(IsEnabled = false)]

    This works, thanks!

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08