Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Dynamics AX 2012 R3 with Business Adapter in dotnet core 3.1 or 6

(0) ShareShare
ReportReport
Posted on by 5

We are going to update the API used to talk with Dynamics AX from SOAP to a rest api. Doing this we would like to be able to use dotnet core 6 to piggyback on the company sdk. I'm not an ax developer so I'm sorry if the lingo isn't correct.

Tried to use the nuget AxBusinessConnector from ms and I can see .net v2.0 dependency. I've also tried from the machine that has the business adapter installed to export all dll;s from the GAC to grab a x64 version for my project of the 'Microsoft.Dynamics.BusinessConnectorNet.dll'.

When running the project and try to use 'Axapta' class it throws error "System.TypeLoadException: 'Could not load type 'System.Web.HttpContext' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral"

I guess the issue is that the BusinessConnector from ms is based on .net v2.0? Is there a newer version somewhere that can support dotnet core?

  • Suggested answer
    tjomo Profile Picture
    5 on at
    RE: Dynamics AX 2012 R3 with Business Adapter in dotnet core 3.1 or 6

    Yes. Now I think I understand.

    1. With the classes we have in Dynamics AX set attribute for custom services. learn.microsoft.com/.../using-custom-services

    2. Create incoming port for tcp.net and pick the 'custom services'

    3. Visual Studio connect Service with the url, it will create base classes to call the endpoint.

    Figure out how to use it and how to set security.

    Now we are not using any of the old deprecated tech. Thanks.

  • Martin Dráb Profile Picture
    231,772 Most Valuable Professional on at
    RE: Dynamics AX 2012 R3 with Business Adapter in dotnet core 3.1 or 6

    Maybe you should explain what you mean by "to update the API used to talk with Dynamics AX from SOAP to a rest api". My understanding was that you're currently using SOAP services of AX and you just wanted to use a REST API instead of SOAP. Is it true? If so, then it's strange to  suggest that the services that you are currently using doesn't allow you to do what you need.

    Also, you're wrong in thinking that that web services offered by AX 2012 allow you just to read and write to tables. As I mentioned, there several types of services. If you want to call method of AX classes, use custom services.

    Document services allow CRUD operations, but they don't operate on tables directly. They use document classes and you can put business logic to these classes.

  • tjomo Profile Picture
    5 on at
    RE: Dynamics AX 2012 R3 with Business Adapter in dotnet core 3.1 or 6

    I've looked a little on this solution. Sadly we are using a lot of static functions that the 'rest api' is supposed to call. As of my understanding the WCF web service (auto generated soap?) is only used to read/write to tables?

  • Suggested answer
    Martin Dráb Profile Picture
    231,772 Most Valuable Professional on at
    RE: Dynamics AX 2012 R3 with Business Adapter in dotnet core 3.1 or 6

    No, there is no support for .NET Core. Also, Business Connector is deprecated and it shouldn't be used anymore

    It seems to me that you're causing the whole problem to yourself by trying to use Business Connector instead of web services.

    Let me suggest a different architecture. Create a Web API application on .NET Core that will expose the REST API as requested. Instead of trying to use Business Connector, let this app call WCF web services provided by AX (document services and/or custom services). Therefore it'll basically translated REST calls to SOAP calls.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,888 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,772 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans