Tuesday, April 13, 2010

IIS 6 & 7 running 32 bit .NET applications

Corflags.exe
Does this executable filename sounds familiar to you? Its unbelievable how ridiculous the error message given by IIS when you happened to be deploying 32 bit .NET webapps on a 64 bit machine.
It says something along the line of : An attempt to was made to load a program with an incorrect format.
Gee, one would have thought that error messages like "Unable to load 32 bit applications in 64 bit IIS with current settings" would make more sense and spare the poor developers some dead brain cells.

For IIS6, the solution was to run 2 command line that does 2 things :-
1. Enable32BitAppOnWin64
2. Register the 32bit version of aspnet_regiis -i -enable
( you can find the complete instruction by googling the keywords above)

For IIS7, the solution is to do step (1) but not with a command line, rather with
the IIS configuration UI where you can find the app pool settings.

I did write a python script that does that fix for II6, will be posting this later on this blog.