SBX - Search With Button

SBX - Forum Post Title

How to Log on to Axapta multiple times with different parameters wihout causing LogonSystemChangedException

Microsoft Dynamics AX Forum

Lakshmi Ravi asked a question on 2 Nov 2011 9:16 AM

Question Status


I have an application where I logon to Axapta using method LogonAs().

I have a UI to enter the parameters.

When I first run, I enter only User parameter. Call LogonAs method.

Then I go back to the UI, and enter configuration parameter.

Before calling LogonAs method again, I call the LogOff method to remove the previous Axapta.

Then call the LogonAs with the new parameters.

I get the exception LogonSystemChangedException. I am not able to proceed to logon due to this exception. I have to close the application and then run it again with the new parametes.

I want to proceed with logon without closing the application. I do not want this exception to occur. Is there any way to terminate the BusinessConnector instance, create a new one and proceed with the LogonAs with the new parameters.

Jonas Bergman responded on 3 Nov 2011 12:24 AM
My Badges


I have not found a solution to this. The Business Connector does not log out until the application is closed. In a web server you can take care of this by using different application pools.

I have tried using threads in a desktop application but that did not help.

Please keep this thread updated if you find a solution.

Attila Ban responded on 19 Apr 2013 8:54 AM

Is there any answer for this?

I also have a similar problem. Written an application which logs into an AOS using .Net BC. Later on when the application want to login to another AOS (long after the previous session has been logged off and disposed of), the same exception (LogonSystemChangedException) is being thrown.

Is there any way I can avoid it?


SBX - Two Col Forum

SBX - Migrated JS