Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

dependencies , waiting for the following dependencies #3937


User avatar
0
reyada created

Dear All,

Can I inject the IServiceBase<IBaseClass> in the controller ?

Can't create component 'Rem.ERP.Web.Areas.Mpa.Controllers.PRequestController' as it has dependencies to be satisfied.

'Rem.ERP.Web.Areas.Mpa.Controllers.PRequestController' is waiting for the following dependencies:

  • Service 'Rem.ERP.PurchaseRequest.IPurchaseRequestHdrServiceBase`1[[Rem.ERP.PurchaseRequest.DTO.CreatePrequestHdrInput, Rem.ERP.Application, Version=4.4.0.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Castle.MicroKernel.Handlers.HandlerException: Can't create component 'Rem.ERP.Web.Areas.Mpa.Controllers.PRequestController' as it has dependencies to be satisfied.

'Rem.ERP.Web.Areas.Mpa.Controllers.PRequestController' is waiting for the following dependencies:

  • Service 'Rem.ERP.PurchaseRequest.IPurchaseRequestHdrServiceBase`1[[Rem.ERP.PurchaseRequest.DTO.CreatePrequestHdrInput, Rem.ERP.Application, Version=4.4.0.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.

1 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    Did you define the following class?

    public class PurchaseRequestHdrServiceBase : IPurchaseRequestHdrServiceBase
    {
        // ...
    }
    

    Otherwise, show relevant code.