When you are creating an application that is using the Dynamics AX 2009 .NET Business Connector to integrate with Dynamics AX 2009, you can see that this one application will result in at least two sessions showing up in the Online users form. Both sessions have however a different session type. Over the lifetime of the process the sessions disappear and appear again and you might wonder what the logic behind this is...

When talking about the .NET Business Connector we need to differ first if the .NET Business Connector is hosted in IIS (e. g. in Enterprise Portal) or not hosted in IIS (e. g. as regular Windows Application).
 

When the .NET Business Connector is not hosted in IIS

In this scenario you can see the following session types:

  • Worker
  • Business Connector Proxy

The Worker session is more or less the main session, that is created with the very first call to the Logon method of the Axapta object. There will be only one Worker session per process instance. This Worker session is kept active until the process hosting the .NET Business Connector is terminated. Calling Logoff or disposing the Axapta object has no effect to the Worker session, it will continue existing.

The Business Connector Proxy session represents a logged on user. So for every call to the Logon method of the Axapta object, there will be one Business Connector Proxy session. The Business Connector Proxy session is kept active until the Logoff method is called.
 

When the .NET Business Connector is hosted in IIS

In this scenario you can see the following session types:

  • Business Connector Proxy
  • Web user

The Business Connector Proxy session is more or less the main session. There exists one Business Connector Proxy session per IIS Worker Process (w3wp.exe) having the .NET Business Connector loaded and the LogonAs method called. The Business Connector Proxy session is kept active until the IIS Worker Process hosting the .NET Business Connector is terminated (or recycled).

The Web user session represents a user that is requesting (loading) a web page. In Enterprise Portal Web Part pages are stateless, so the Web user session is not persistent; it will disappear after a small amount of time (usually 30 Seconds) after the page content was successfully sent back to the client.

--author: Egil Ivar Skjold
--editor: Alexander Lachner
--date: 14/05/2009