Closed BekAllaev closed 2 weeks ago
hi
You need to add C# Client Proxies
for your Application
's api because Blazor wasm is a separate app.
https://docs.abp.io/en/abp/latest/UI/Blazor/Overall#dynamic-c-client-proxies https://docs.abp.io/en/abp/latest/API/Dynamic-CSharp-API-Clients https://docs.abp.io/en/abp/latest/API/Static-CSharp-API-Clients
Oh I understand what is the reason of the problem, thanks a lot. So I just need to inherit my IStasticsRecalculator
from IRemoteService
Oh I understand what is the reason of the problem, thanks a lot. So I just need to inherit my
IStasticsRecalculator
fromIRemoteService
hello my dear bro,I have the same problem too,but it’s unuseful afterl I do the same step liek you that inheriting my IXXXService from IRemoteService,do you know why? Or I misunderstand your opeartion?Could you please tell me how you resolve this problem?
Hello, @yuannisha. Can you explain please - what error you are getting?
Hello, @yuannisha. Can you explain please - what error you are getting?
An exception was thrown while activating Wz.ReservingSystem.CustomUserAppservice.CustomUserAppservices.
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Wz.ReservingSystem.CustomUserAppservice.CustomUserAppservices.
---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'Wz.ReservingSystem.CustomUserAppservice.CustomUserAppservices' can be invoked with the available services and parameters:
Cannot resolve parameter 'Microsoft.AspNetCore.Identity.SignInManager1[Wz.ReservingSystem.Users.User] signInManager' of constructor 'Void .ctor(Volo.Abp.Domain.Repositories.IRepository
2[Wz.ReservingSyste
m.Users.User,System.Guid], Volo.Abp.ObjectMapping.IObjectMapper, Volo.Abp.Domain.Repositories.IRepository2[Wz.ReservingSystem.ReservingOperation.ReservingInformation,System.Guid], Microsoft.AspNetCore.Identity.SignInManager
1[Wz.ReservingSystem.Users.User])'.
This is my error
Hello, @yuannisha. Can you explain please - what error you are getting?
it appears when I use the API for my application service
So ABP cannot resolve SignInManager
. I haven't found anything about injecting SignInManager
into application service but I have found this article from ABP that explain how to implement custom SignInManager
- https://docs.abp.io/en/abp/2.9/How-To/Customize-SignIn-Manager. I wish that will help somehow but I think that IRemoteService
interface won't help you
So ABP cannot resolve
SignInManager
. I haven't found anything about injectingSignInManager
into application service but I have found this article from ABP that explain how to implement customSignInManager
- https://docs.abp.io/en/abp/2.9/How-To/Customize-SignIn-Manager. I wish that will help somehow but I think thatIRemoteService
interface won't help you
I don't think the issue lies with using SignInManager, but rather with the error message: Autofac.Core.DependencyResolutionException: None of the constructors found on type 'Wz.ReservingSystem.CustomUserAppservice.CustomUserAppservices' can be invoked with the available services and parameters. I am using abp version 8.1, and this problem occurs after I finish the application service and expose it as an API. Whenever I use the API, this error occurs. It seems to be related to automatic dependency injection. I never encountered these issues when using older versions of abp, but after using versions 7 and above, this problem keeps happening. I am unsure how to resolve this.
Autofac.Core.DependencyResolutionException: None of the constructors found on type
The accurate description is as follows: I have not modified the framework source code. I have simply added entities, mapping tables, service interfaces, implemented service interfaces, and exposed the services as APIs. After completing these steps, I began testing my API. However, when making API requests, I encountered this issue. Do you know what might be causing this problem? Could you please help me resolve this issue? I am a bit anxious to fix this problem. Thank you very much!
Can you please try to remove SignInManager
from the parameters of the constructor of CustomUserAppservices
and try to call some methods of CustomerUserAppservices
and say me is it working or not? @yuannisha
Can you please try to remove
SignInManager
from the parameters of the constructor ofCustomUserAppservices
and try to call some methods ofCustomerUserAppservices
and say me is it working or not? @yuannisha
Oh thanks you a lot,it seems like being resolved with your suggestion,thanks!
Is there an existing issue for this?
Description
I have interface
IStasticsRecalculator
defined in toApplication.Contracts
project and its implementation -StasticsRecalculator
inApplication
project. In module class ofApplication
project I register it like this:After that I inject
IStasticsRecalculator
into class in Blazor project and get this error:Reproduction Steps
No response
Expected behavior
No response
Actual behavior
No response
Regression?
No response
Known Workarounds
No response
Version
8.0.1
User Interface
Blazor
Database Provider
EF Core (Default)
Tiered or separate authentication server
None (Default)
Operation System
Windows (Default)
Other information
No response