quarta-feira, setembro 08, 2010

Running 32-bits .NET applications on Windows 7 64-bits.

I tried to run a 32-bits .NET application that belongs to the enterprise that I work for on Windows 7 64-bits but IIS 7 was unable to load a DLL or one of its dependencies.

The message error is was the following:

Parser Error Message: Could not load file or assembly 'Engine.Client' or one of its dependencies. An attempt was made to load a program with an incorrect format.

After some Googled, I found out that I should explicitly instruct IIS to run 32-bit applications.

Next you'll see all the steps needed to solve this problem.
  • Open the IIS Manager. You'll see two items: Application Pools and Sites. Select Application Pools. My site is configured to use DefaultAppPool. See picture 1.




  •  Right click on the pool that your application uses (DefaultAppPool, in my case) and select the option Set Application Pool Defaults. See picture 2.





  • A configuration window will pop up. Notice that the property Enable 32-Bit Applications is set to false. See picture 3.




  • Change the Enable 32-Bit Applications value from false to true and close the configuration window.Done! Problem solved. See picture 4.




    I hope this post will be useful. Any question, fill free to get in touch.

Nenhum comentário: