Is it possible to use IHttpClientFactory with Acumatica? Or can it only be built with mvc? I've built an apiclient for REST calls in a processing screen and am injecting services in a startup.cs page but I get an error:
An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an asynchronous handler or module or during certain events in the Page lifecycle. If this exception occurred while executing a Page, ensure that the Page is marked <%
I added a reference to autofac. Is there a configuration I need to add or register services a different way?
The error message indicates an attempt to run an asynchronous method within a synchronous method. This is not allowed in C#. You can try to run the asynchronous method in a synchronous task instead. Example: