Because one or more of the components used by your application are 32-bit.
Or, because one or more components used by your application are not found when you toggle the App Pool mode.
Generally speaking, IIS will divide up Modules and Handlers into 32- and 64-bit binaries, and prevent one bitness or another from seeing the other bitness with the bitness32 or bitness64 preconditions.
Top-of-head example:
<modules> <module name="something" path="c:\program files\something.dll" precondition="bitness64"> </modules>
If you change the app pool to 32 bit, keep in mind:
- bitness64 won't be true
- 64 bit apps aren't lied to about file locations; 32 bit apps might be (Program Files (x86), or System32 (which redirects to SysWow64))
the same module/handler might have an entry like this:
<modules> <module name="something32" path="c:\program files\something32.dll" precondition="bitness32"> </modules>
Which will only work if something32.dll is in Program files (x86).
The event logs should help you track down which module is being problematic, if it's a module or handler load failure.
See also: