Sitecore version: 9.0.2
Deployment model: PAAS Scaled
What I am doing: I am sending emails through scheduled tasks. The flow is working fine in the On-Premises standalone model.
In the higher PAAS Scaled environment, we got the following error:
Exception: System.InvalidOperationException Message: Unable to resolve service for type 'Sitecore.EmailCampaign.Cd.Services.IClientApiService' while attempting to activate 'XXXXXX.Foundation.EXM.Services.ExmService'. Source: Microsoft.Extensions.DependencyInjection at Microsoft.Extensions.DependencyInjection.ServiceLookup.Service.PopulateCallSites(ServiceProvider provider, ISet`1 callSiteChain, ParameterInfo parameters, Boolean throwIfCallSiteNotFound)
I have tried both the approaches of creating the client as mentioned by Sitecore in the document.
I also came across this article https://andrewwburns.com/2018/08/17/avoiding-the-iclientapiservice/
But in both the approaches, the error is the same. Can you please guide me on this?
Thanks in advance.