Microsoft.Dynamics.BusinessConnectorNet cannot connect to a different AOS instance

Hello Guys,

I have hit a not well known limitation where once the Dynamics AX client connects to AOS instance, it is impossible to connect to a different AOS instance unless you restart the whole application process. When LogonAs method is called, the client fails with LogonSystemChangedException. A short blurb about this limitation is posted here at the bottom under Remarks.

I have tried to workaround the issue by loading the required object in separate AppDomain, but unfortunately the Dynamics AX client library loads in the main AppDomain and it impossible to unload it. This issue is documented by another person here.

Now this sounds like a serious limitation of the Dynamics AX client. What would you recommend to try next?

Hey CozyRoc,

I think i have the same issue.

I’m using an asp.net web application (.aspx) to update Dynamics Ax (Axapta) information.

I have deployed my aspx dll into two different instances (one for DEV and another one for LIVE),

If my business connector connects to one instance, its doesn’t connect to other & vice versa…

I’m connecting to Axapta as given below

System.Net.NetworkCredential networkCredential = new System.Net.NetworkCredential();

networkCredential.UserName = “Active Dir Account” (Also referred in Ax >> Administration >> Setup >> Security >> Business connector Proxy account field)
networkCredential.Password = “Password”;
networkCredential.Domain = “Fully qualified domain name”;

dax.LogonAs(“Active Dir Account”, “Fully qualified domain name”, networkCredential, “Current Company Code”, “”, AOSInstance@AOSServer:Port, “”);

Would appreciate if someone assist me on this

Thanks
Jaffar

Hi Jaffar,

There is one workaround. If you replace the AX configuration in use, then you can connect to a different AX instance without restart.