This is the new code
public class MainController : ApiController
{
[ActionName("Method")]
[HttpPost]
[Authorize]
public IHttpActionResult CallMethod(ClassMethodCallRequest request)
{
dynamic retValue;
bool success = false...
I tried client.Open and client.close for this and removed my async method. But now I am receiving this error. It is also temporary and happens only the 1st time. As I resubmit my power automate flow, the error is resolved. Is it due to some timeout? This error happens every first time in a...
So do you mean instead of await System.Threading.Tasks.Task.Run( () => callMethodAsyncNew(client, callContext, request.className, request.methodName, request.dataJsonStr));
I should use System.Threading.Tasks.Task.Run( () => callMethodAsyncNew(client, callContext, request.className...
It happens regardless of async or sync is called. It wasn't happening before I added 1. timeout and 2. Async
Also, this error is not caught in my exception block even in case of sync
I have created a C# wrapper for my Ax 2012 AIF Service which is triggered from power automate. There is a limitation in power automate that the gateway times out in 110 seconds. So, my requirement is to call my C# wrapper in async manner and get response immediately and not wait for any response...
I am getting this error when I run my C# wrapper from Power Automate. But this error is returned only sometimes. On resubmitting my power automate flow, the code works as required.
{
"Message": "An error has occurred.\r\nclientRequestId: 66b3b4af-edc0-4bbb-b6e2-11e217c00480"...
I resolved the error by using client.Open() and client.close() instead of creating client inside of using keyword. I guess after async call return, it was trying to access the object which was already disposed.
But my main issue remains unsolved. The JSON is not returned immediately back to...
I tried to debug it and got these exceptions when my async call is made from "CallMethodAsyncCustom" method. I had made that method too return type void instead of string so that I can call from my original method without any warnings.
A first chance exception of type...
I don't actually need the reply from async method. I have handled any errors in AX 2012 side for that. But the main issue is the AX 2012 method is not getting called.
Also, I wanted to ask that is the async performed on C# side ? Or do I have to manually write the code for async in AX 2012...
Hi,
Sorry for posting in multiple forums. I assure you I will update it in all once I get the solution.
As for the callMethodAsync document, here is the code,
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]...
I am trying to call my AX 2012 method async using C# wrapper but the AX 2012 method is not executing. The same data is correctly processed by sync call and is executing properly. Below is the code for Controller in C#. Why is it not executing async method ?
I have tried to call it without await...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.