Mostrando postagens com marcador windows. Mostrar todas as postagens
Mostrando postagens com marcador windows. Mostrar todas as postagens

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.

Executando aplicações .NET de 32 bits no Windows 7 de 64 bits

Eu fui executar um aplicativo .NET da empresa, desenvolvida para rodar em 32 bits, no Windows 7 64 bits e o ISS 7 não consegui carregar uma DLL ou uma de suas dependências.

A mensagem apresentada foi:

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.

Após algumas buscas no Google, descobri que a opção de executar aplicativos de 32 bits deveria ser habilitada explicitamente.

Abaixo seguem os passos a serem executados.
  • Abra o gerenciador do IIS. Tu verás dois items: Application Pools e Sites. Selecione Application Pools. No meu caso, o meu site estava configurado para usar o DefaultAppPool. Veja a figura 1.


  •  Clique com o botão direito sobre o pool que a tua aplicação estiver usando (DefaultAppPool no meu caso) e selecione a opção Set Application Pool Defaults. Veja a figura 2.



  • Abrirá uma janela de configuração. Note que a propriedade Enable 32-Bit Applications está com o valor false. Veja a figura 3.


  • Mude o valor do campo Enable 32-Bit Applications para true e feche a janela de configuração. Pronto! Problema resolvido. Veja figura 4.


    Espero que esse artigo seja útil. Qualquer dúvida entre em contato.