IIS6 32-bit mode ASP.Net configuration
This shouldn't be something that is needed given how insanely out-of-date IIS6 is, but some firms are still stuck on old platforms.
IIS6 on 64-bit windows can be set to either run natively or forced to 32-bit mode. This is done at the server level, and not the application pool as with more recent versions of IIS. This is a pain.
The ASP.Net tab, used for configuring the version of the .Net framework you wish to use with an application, will only work in 64-bit mode. So if you're running in 32-bit mode, you cannot select the version. This is a pain.
You can though, work around this with the command line. This scenario covers setting a single web-app to use .NET 4.0, and we assume that .NET 2.0 is already installed and working on IIS (in 32-bit mode).
- Put your app in its own app pool (they cannot run different versions of .NET simultaneously)
- Open a command prompt in C:\WINDOWS\Frameworkv\4.0.30319 (or relevant version)
- Register IIS: aspnet_regiis -i
- Script map your specific web-app: aspnet_regiis -s W3SVC/1/ROOT/[pathtomyapp]/ (replacing [pathtomyapp] with the path to your app - if you don't run on the default site, you'll also have to change the "1" to match your Site ID).
- Load IIS manager and navigate to 'Web Service Extensions'
- Ensure "ASP.NET v4.0.30319 (32-bit)" is allowed (or the version you're interested in)
- iisreset for good measure