Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

External web service call c#/dll wrapper deployed via real time services problem

(0) ShareShare
ReportReport
Posted on by 20

Hello all,

Sorry for the long post.

We have Dynamics AX 2012 R3 CU10 running with retail POS at remote stores. 

We need to access some legacy data for validation from POS since we have stores on two systems, legacy POS and dynamics POS.  W were told by Microsoft to extend real time transaction services to call a new method in x++ that should reference a c# dll that then references a soap service on our network in order to validate the legacy data to meet our need from the POS. 

The problem we have encountered is related to the .dll resolution from within x++ on AOS server that is relayed from IIS real time service. 

According to everything posted that I have read far and wide, we should compile our c# project as release build/x64 and deploy to AOT which we did successfully and we can see it in AOT.  We then were instructed to create a test job in AOT to call the service which we did and it works. 

Our problem occurs when the call is made from the POS to the new method such as this example InvokeExtension("TestMethod", "ThisTest");  When this executes, we get the old ClrObject not created error exception on the statement where we attempt to create an instance of our .dll from x++ on AOS server.  We don't have connectivity issues or anything like that.  The system works and I can sell items and sync into central AX both ways.  This is new functionality we are building.

Things tried:

I have insured that the .dll is in VSAssemblies folder of the AOS server bin area.  I have done a full compile, full CIL, deleted and rebuilt Xppil multiple times.  Switched hot swapping on and off.  Restarted AOS multiple times.  Added the .dll to the bin folder in addition to the VSAssemblies folder.  Registered the .dll in the GAC and not. 

The Solution:

We had to copy the .dll into the folder where real time service .dlls are located.  ( C:\Program Files (x86)\Microsoft Dynamics AX\60\CDX\Real-time Services\6.3\Bin ).

Question:

Can anyone offer insight as to why this is what we are having to do with documentation to back it up?  Please no guessing or asking me to try this as I assure you, I have tried everything as we've been on this system going on 2 years at approximately 100 locations.

Thanks

*This post is locked for comments

  • rstewart Profile Picture
    rstewart 20 on at
    RE: External web service call c#/dll wrapper deployed via real time services problem

    Hi ievgen,

    Spasibo

    Unfortunately we tried all of this and it does not work as per the documentation but it does work if we put the .dll in the IIS real time service install bin folder.  

    I would like to know why we are having to do this as it does not match the documentation and posts from the web that I have read.

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: External web service call c#/dll wrapper deployed via real time services problem

    Adding c# project to AOT is a good way to go but not mandatory. It is enough to add it to client\bin and server\bin folders. Code executed on the server look for DLL in the server bin folder and in GAC. Client code looks at client bin folder. If it works from x++ job it means that client can find DLL but it does not mean that this DLL is on the server. Code invoked by realtime server is executed on the server, so easiest way would be to drop DLL to server\bin folder for each AOS you have.

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,309 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans