logon using session Ax2012

Hi all

am integrating .Net windows application with AX2012

whn i using logonsession as

’ m_ARTransit.AXLogonSession.Logon(Nothing, Nothing, Nothing, Nothing) working fyn,

but whn i go for credentials like

'm_ARTransit.AXLogonSession.LogonAsGuest(New System.Net.NetworkCredential(“username”, “password”, “domain”), “company”, “language”, “AOS”, configuration)

'm_ARTransit.AXLogonSession.LogonAsGuest(New System.Net.NetworkCredential(“xxxx”, “yyy”, “zzz.COM”), “ceu”, “EN-US”, “”, Nothing)

looking for suggestions

plz help me as soon as possible…

You didn’t tell us which type of object you have in the property called AXLogonSession. I guess it’s Microsoft.Dynamics.BusinessConnectorNet.Axapta, right?

You also haven’t mentioned what’s the problem.

By the way, I’ve never used LogonAsGuest(). I only assume it requires the guess to be allowed in AX, which may not be the case in your system.

It would be useful if you mentioned what you’re trying to achieve. AX 2012 has better ways for integration than this API.

Hi martin

thanks for ur reply,

am using Microsoft.Dynamics.Ax.Managedinterop

i tried with the same

"m_ARTransit.AXLogonSession.LogonAsGuest(New System.Net.NetworkCredential(“username”, “password”, “domain”), “company”, “language”, “AOS”, configuration) "

login , logonAs, logonAsGuest but its not connected,

but whn i go with ’ m_ARTransit.AXLogonSession.Logon(Nothing, Nothing, Nothing, Nothing) only working.


Can you please explain what exaclty you are trying to do if you can do the sucessfull login,because in 2012 we have have many options ,may be there is more easier way.



hi pawan,

thank you for ur reply,

i want to integrate .net with AX,

as per my requirement, my client using one VB.NET window application, based on some event or button click,

client shd pass the data into AX.

so tat i created one DLL file, for tat i set session logon.

if i gave m_ARTransit.AXLogonSession.Logon(Nothing, Nothing, Nothing, Nothing)

its working fyn.

so i need to pass proper info in the following methood.

"m_ARTransit.AXLogonSession.LogonAsGuest(New System.Net.NetworkCredential(“username”, “password”, “domain”), “company”, “language”, “AOS”, configuration) "

suggestion plz…


If you want to integrate AX with .Net then i this AIF Custom Service will be the Best Option.If you are Ok with AIF then please create a Custom inBOund Service and Deploy it on the AOS,after that you can consume the webservice in VB.net .What ever the logic you want you can define in the Class and then you can attach that class to the Service and then simply deploy it on AOS.

In case of any issue do let me know.



Hi pawan,

i know we can use AIF, even i treid with AIF its working,

but am working on my client requirement, tats the pblm…

hi all, 
at last i done.
     DynAx.LogonAs(AXUser.Text, Domain.Text, nc, Company.Text, null, AOS.Text, Configuration.Text);

DynAx.LogonAs(Arun, Domain.Text, nc, ceu, null, servername:portnumber, Configuration.Text);
Configuration.Text- > .axc file path.
we need to keep short cut file in specific folder to access the ax instance.