Recently, we needed to migrate an old service which used Chilkat components to a new server. Even though all files were identical, the service kept on throwing the same error over and over:
Could not load file or assembly ‘ChilkatDotNet2′ or one of its dependencies. An attempt was made to load a program with an incorrect format.
Imediately, I thought of the .NET version or the dll bit version. I first checked that the application pool was running with the same old .NET version which it was. So next step was to check the dll bit version since considering this was not a new application, the dll’s were using 32-bit. To check/change what bit version the application is running on, I had to follow the following steps:
- Open the IIS
- Open Application pool and select the application trying to run
- Rigth Click – Advanced Settings
- Set “Enable 32-bit Applications” to true
This solved the issue!