-
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
I also tried redefining the controller
However, if I include a new method in the controller, this is not recognized by the proxy, am I missing something?
5 Answer(s)
-
0
Hi,
Do you use generating client proxies command without contracts ?
https://abp.io/docs/latest/framework/api-development/static-csharp-clients#without-contracts
-
0
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 -
0
Ok, here is the possible reasons of the problem.You don't pass any module parameter
-m
and it'sapp
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
-
0
If you wish to create client-proxy for Account module, you can still pass
-m account
parameter for generating client-proxy. -
0
[RemoteService(IsEnabled = false)]
This works, thanks!