0

On a multi AOS environment we have created a .NET application which fetches client sessions details using Business Connector .NET dll.

When we logon on an AOS Server we get the client sessions but when we select another AOS from the dropdown list to get these client sessions, we receive the following exception:

 There was an exception during the execution of your request. 
 Microsoft.Dynamics.BusinessConnectorNet.LogonSystemChangedException
   at Microsoft.Dynamics.BusinessConnectorNet.Axapta.Logon(BC_PROXY_ACCOUNT_INFO* pBCProxyAccountInfo, String company, String language, String objectServer, String configuration)

On the Microsoft wiki we read the following information about the exception:

The LogonSystemChangedException exception is thrown when logon to Axapta fails due to logon parameters not matching those currently in use for the Business Connector.

And that's correct because we are trying to logon to another AOS instance.

In the LogonAs method I pass in the AxUser proxy account and the AOS instance like 02@AOS01:2713.

When I recycle the API in IIS and then choose another AOS Instance, then this works.

How can we connect to different AOS instances using the same application? Can we somehow cleanup the Businnes Connector connection after a specific action?

Mivaweb
  • 5,580
  • 3
  • 27
  • 53
  • Do you log off from the first AOS before connecting to the second AOS? Take a look at https://stackoverflow.com/questions/59759815/close-user-sessions-axapta , but be aware that despite a log off, sessions remain active. Not sure if this will cause your problem or not. – FH-Inway May 17 '21 at 16:36
  • Yes I do a logoff and the session is indeed set to inactive in AX but it seems that in the Business Connector the connection is also somehow still alive and therefor it throws this exception. – Mivaweb May 18 '21 at 17:47

0 Answers0