The solution is to configure the application pool and enable 32-bit application support. For IIS 7, running on Windows Vista, you can do this from the application pool's advanced settings.