Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: AX to AX Integration using AIF (net.tcp) within a Class Library (DLLs)

$
0
0

Although this question is old now, but since i am working on the same scenario and have faced the exact same error, so i will submit the solution for anybody that could pass through the same issue in the future.

The issue reason is: unfortunately app.config file of the C# project (class library in this case) is not seen inside AX, so all configurations including the endpoint address and binding contained in app.config is useless and you must configure your service client in the C# code before calling the client methods. So to accomplish that i will post here my answer i have already posted in other threads as follows:

For those who work with AX 2012 AIF services and try to call their C# or VB project inside AX (x++) and suffer from such errors of "could not find default endpoint..."... or "no contract found..." ...

Please go back to your visual studio (C#) project and add these following lines of code before defining your service client, then deploy the project and restart AX client and retry: Note, the example is for NetTcp adapter, you could easily use any other adapter instead according to your need.

Uri Address = new Uri("net.tcp://your-server:Port>/DynamicsAx/Services/your-port-name");
NetTcpBinding Binding = new NetTcpBinding();
EndpointAddress EndPointAddr = new EndpointAddress(Address);
SalesOrderServiceClient Client = new SalesOrderServiceClient(Binding, EndPointAddr);



Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>