web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Using business connector on AX

(0) ShareShare
ReportReport
Posted on by

Hello,

I am using business connector of AX from C#

I try connect to like the sample on http://msdn.microsoft.com/en-us/library/cc197126.aspx

but I got a message while doing  ax.Logon(null, null, null, null);

The message: Unable to log on to Microsoft Dynamics AX

The code is running from server, where there are privileges.

What may be the reason for that?

I had problem before of error after publishing:

Could not load file or assembly 'Microsoft.Dynamics.AX.ManagedInterop' or one of its dependencies. An attempt was made to load a program with an incorrect format.

so, I add it from assembly: C:\Windows\assembly\GAC_64\Microsoft.Dynamics.AX.ManagedInterop\6.2.0.0__31bf3856ad364e35\Microsoft.Dynamics.AX.ManagedInterop.dll

(Instead of: C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\Microsoft.Dynamics.AX.ManagedInterop.dll)

I don't know whether this was the right thing to do,

but that solved the above error.

The AX is on 32 bits, but the windows server (windows 8) is 64 bits.

Business connector is from: C:\Program Files\Microsoft Dynamics AX\60\BusinessConnector\Bin\Microsoft.Dynamics.BusinessConnectorNet.dll

Thanks :)

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    Maybe the default configuration isn't valid. Open the AX configuration utility, change Configuration Target to Business Connector and review the configuration.

  • Community Member Profile Picture
    on at

    EP is working fine.

    SSRS is working fine.

    I go to AX configuration utility, change the configuration target to Business connector (I don't know why, but I have change that, as you said) - Same problem.

  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    If you just opened the configuration and didn't check whether it's correct, the exercise was pointless.

  • Verified answer
    Community Member Profile Picture
    on at

    Solved.

    After publishing, and adding api in IIS - I didn't connect to correct application pool.

    Nevertheless, the instructions on  ,

     I shall declared the application pool as asp.net v4, I shall declare the application pool for the same as business connector application pool.

    Thanks, anyway :)

  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    You might have get an answer if you ever mentioned that you're running the library from IIS (not from IDE, where people usual test their code before deploying it).

    Please don't forget to mention crucial information next time, otherwise everybody just wastes time.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans