Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Using business connector on AX

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: Using business connector on AX

    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.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Using business connector on AX

    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
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: Using business connector on AX

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Using business connector on AX

    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.

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: Using business connector on AX

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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans