Using 32-bit DLLs on a 64-bit server

The old servers at my work used a number of DLLs that were either generated in-house or purchased/downloaded from a third-party. After upgrading our servers to 64-bit machines we still had the need to support these DLLs for the large number of sites still using code from these DLLs.

After registering the DLLs with the server, we were still having problems getting things to work properly. It just so happened that I stumbled across someone mention the issue with 32-bit DLLs on a 64-bit server and how to get IIS to support them.

Ultimately it was as simple as opening a Command Prompt (ran as Administrator of course) and using the command:

%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true

The %windir% is ultimately just your Windows installation which will more often than not just be C:\Windows

So if you have to support older DLLs, keep this in mind as you will probably need to do this to get them to work properly.

Leave a Reply

Your email address will not be published. Required fields are marked *