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
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.
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 :)
If you just opened the configuration and didn't check whether it's correct, the exercise was pointless.
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.
Maybe the default configuration isn't valid. Open the AX configuration utility, change Configuration Target to Business Connector and review the configuration.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156