Microsoft Dynamics 4.0 has a 32-bit BizTalk Adapter which is not compatible with 64-bit versions of Windows or BizTalk. Under Windows Server 2003, the AX 4.0 Adapter would not even install on the 64-bit version of the OS. On Windows Server 2008 R2 (which is only 64-bit), the Adapter installs, but it won’t work.
However one of my colleagues, Justin, figured out what is wrong with the Adapter and a workaround to “fix it” so that it would work. The AX 4.0 BizTalk Adapter is a remoting adapter and there’s a Windows Portable Executable (PE) -- axaifremsrv.exe -- that actually enables the communication between BizTalk and AX. This EXE is NOT marked 32-bit only and that is why things fail. Specifically, the EXE’s Header table doesn’t tell Windows and the CLR to load itself into a 32-bit only Process.
To test this assertion, use the CorFlags utility (which is one of the Visual Studio SDK Tools) to mark axaifremsrv.exe as a 32-bit only EXE, i.e.,
Open up a Visual Studio Command Prompt, then navigate to the AX 4.0 Bin folder (which is usually here on a 64-bit system: C:\Program Files (x86)\Microsoft Dynamics AX\4.0\Client\Bin) and then execute the following command on the axaifremsrv.exe:
corflags axaifremsrv.exe /32BIT+ /Force
The CorFlags utility will then change the EXE’s Header so that the EXE will now correctly identify itself as a 32-bit only Windows PE.
The BizTalk Host(s) assigned to run the send and receive functions of the Axapta Adapter must also be set to 32-bit only within the Host’s definition in the BizTalk Server Administration Console.
More information on the CorFlags Tool can be found here:
Lastly, I should say that this modification is not supported by anyone and may be a violation of some kind; I am just explaining what is wrong and how we discovered it. The first supported version of the Microsoft Dynamics AX BizTalk Adapter for 64-bit systems is Microsoft Dynamics AX 2009 SP1: