Running eSpaces in 32-bit mode in Windows 2008 R2

Running eSpaces in 32-bit mode in Windows 2008 R2


OutSystems Agile Platform supports Windows 2008 R2 since version 5.0. Contrarily to previous versions of Windows Server, this one is only available as 64 bit.
You or your customer might be interested in running the Agile Platform in Windows 2008 R2, but it could occur that some integrations in OutSystems require that you run the eSpace in 32-bits mode.

This post is a guide in configuring a 32-bit application pool to run Agile Platform eSpaces in Windows 2008. It explains how to create a 32-bit application pool, how to make the necessary adjustments to configuration files, and how to move your applications there. It also explains when to put your eSpace in the 32-bit application pool - there might be scenarios where you want some eSpaces running 32-bit but others taking advantage of 64-bits.

Creating a 32-bit application pool

To do this, in IIS Manager, simply create the application pool under a given name and then, under Advanced Settings, change "Enable 32-bit Applications" to True.
Remeber to apply the recommendations for 32-bit IIS, particularly the recycling limits. If in doubt, look at the checklist for Agile Platform, under any 32-bit operating system.

Move your eSpaces to the 32-bit application pool

Under IIS Manager, go to Sites -> Default Web Sites and identify your eSpace. Right-click it, choose Manage Application -> Advanced Settings, and change Application Pool to the application pool you just created.

Configuring 32-bit .NET for correct usage

At this point, your eSpace will no longer be accessible, and will be giving runtime errors. This is because there are some settings that the Agile Platform puts in machine.config which are only being written in the 64-bit version, and need to be moved to the 32-bit version.

In typical installations, you will find the files in the below locations:
  • 32-bit: C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config
  • 64-bit: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config

The following parts need to be copied:
  • (Edit: not needed in or - check posts below) All entries under <configuration>\<appSettings> that are related to OutSystems. This section is usually at the end of the file. Typically these will always be prefixed with "OutSystems", so they are easy to identify. If in doubt, copy all the settings you find there. Note that <appSettings> could not exist in the 32-bit file - if it is not present, create it.
  • The <browserCaps> tag (under <configuration>\<system.web>) and all its children. This setting contains browser-related information that will affect display rendering. Make sure to put it in the right place, after the </roleManager> tag.

Note that, after each revision patch or platform upgrade, you need to repeat these steps to ensure that everything stays consistent.

What eSpaces do you need to move to the 32-bit application pool?

This question is trickier. You will need to put in the 32-bit application all eSpaces that either:
  • Have a web-screen which contains logic that calls the 32-bit integration;
  • Have a timer that run logic calling the 32-bit integration;
  • Is making a web-service available which, in its logic, calls the 32-bit integration.
This is easier to understand with some examples:

Example 1:
  - You have an SAP BAPI integration self-contained in eSpace IntegrateSAP, using SAPExtension. All actions and screens that use SAP are called there. There is a link in eSpace HomeApp to the several screens in IntegrateSAP.

In this example, only IntegrateSAP eSpace needs to be put in the 32-bit application pool.

Example 2:
  - You have an eSpace MyLegacyIntegration that uses extension Legacy32 and exposes a public action CallLegacyIntegration. This eSpace has no screens, timers, or web services exposed.
  - In your eSpace UserManagement, screen ManageLegacyUsers makes use of that action;
  - In your eSpace FinanceReports, you have a timer NotifyLegacyUsers that makes use of the action;

In this situation, you need to put both UserManagement and FinanceReports in the 32-bit application pool, but you don't need to put MyLegacyIntegration there - since the logic is not actually running in that eSpace.


As with everything, you should test these settings correctly to ensure proper runtime behavior. Note that this approach should be used with the idea of "migrate to 64-bit" in a near future, avoiding to get stuck in 32-bit code and at some point, that option no longer exists.

If you detect any inconsistency or error in what is said above, please feel free to post a reply to this topic.

In addition to what is said in my previous post, in order to run OutSystems eSpaces in 32-bit mode in Windows 2008R2, you will also need to do the following:
  • Install both 32-bit and 64-bit Client Tools for Oracle 11g. Make sure to first install the 32-bit tools first, followed by the 64-bit tool. Refer to the install checklist for additional steps (permissions & additional configuration).
  • Delete ORACLE_HOME variable.
You might need to restart IIS for changes to make effect, if you Agile Platform Server was already installed and running.

Just another note: when creating the application pool, make sure it uses the Classic pipeline mode, otherwise eSpaces will be moved out of it when you republish/redeploy them.

After configuring an eSpace to run in the 32-bit application pool, you get the following error upon accessing it:
	Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request.
Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Unable to connect to SQL Server session database.

Source Error: 

Line 20:     
If you move the eSpace back to the 64-bit application pool, it works properly. You have checked and the <appSettings> in 32-bit machine.config and 64-bit machine.config are exactly the same.

Additionally, you are using either SQL Server Aliases (cliconfg or SQL Server Configuration Manager) or Oracle TNS Names to access your database.


The alias configured is only known for 64-bit processes, and must also be configured for 32-bit.


To configure alias for 32-bit processes, you need to do that in 
  • SQL Server (if using cliconfg):
    • There are two cliconfg executables. One in C:\Windows\System32\ (64-bit version) and another in C:\Windows\SysWOW64\ (32-bit version). Configure the alias in both.
  • SQL Server (if using SQL Server Configuration Manager):
    • You need to configure the alias on both SQL Native Client and SQL Native Client (32-bits)
  • Oracle TNSNames:
    • Configure the same entry in TNSNames.ora on both the 32-bits and the 64-bits client installation.

Please also note that if you do not need the aliases, you may as well configure the server name and instance directly in Configuration Tool. Examples:
  • SQL Server: mysqlserver.mydomain\MYINSTANCE,1143
  • Oracle (EZCONNECT): myoracleserver.mydomain:1521/MYINSTANCE


Following up on this thread, OutSystems has improved the Configuration Tool to avoid the need to manually copy <appSettings> from the 64-bit machine.config to the 32-bit machine.config. This improvement is available in the following version:
  • 5.0: starting with revision;
  • 5.1: starting with revision
For newer versions to come (after 5.1), this improvement will also be available.
In earlier revisions, the above procedure still applies.