Posts

Showing posts with the label Business Connector

Could not load file or assembly 'Microsoft.Dynamics.BusinessConnectorNet' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Image
Recently we were developing web service that that perform CRUD operation on AX 2009. We use business connector dll for this task. When we deploy app on IIS we start getting following error. Could not load file or assembly 'Microsoft.Dynamics.BusinessConnectorNet' or one of its dependencies. An attempt was made to load a program with an incorrect format. Dynamics AX .NET Business Connector contains both managed code and unmanaged 32-bit x86 code and as such it cannot be loaded by a 64-bit application. We resolved our issue by enabling 32 bit application in IIS. 1. Go to IIS. 2. Select you application pool. 3. Click Advance setting. 4. Set Enable 32-Bit Application to true.

Business Connector Cache/Store Data In Memory

Image
During development in Dynamics AX 2009 and using business connector to get data from Dynamics AX i faced a problem that result were stored in cache and not reflecting the changes, to resolve this issue when i made changes on Dynamics AX i restart the AX service but after some time it stops working and it again not reflecting the changes, so i add following line of code in business connector code after logging in and it start working. Axapta ax = new Axapta(); ax.LogonAs(credentials.UserName, credentials.Domain, new System.Net.NetworkCredential(credentials.UserName, credentials.Password), null, null, null, null); ax.CallStaticClassMethod("SysFlushAOD","doFlush"); ax.CallStaticClassMethod(“SysFlushAOD”, “doFlush”);