Windows – Upgrading to x64 results in HTTP 500

asp.netiiswindows

I upgraded my development machine to 64-bit Win7, and now when I try to connect to a local ASP.Net project I get:

HTTP Error 500 …
Calling LoadLibraryEx on ISAPI filter "C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll" failed

There are several puzzling things about this; the ASP.Net project was a .Net 2.0 ASMX so it was using C:\Windows\Microsoft.NET\Framework\v2.0.50727. If it updated to x64 without asking me, should it not use C:\Windows\Microsoft.NET\Framework64\v2.0.50727\? Where is C:\Windows\Microsoft.NET\Framework\v4.0.30319\ coming from?

I opened IIS Manager and the selected .Net Framework version for my machine is 2.0.50727. Framework version for my default application pool is the same.

I am developing in VS2008, which does not even have an option for targeting .Net 4.0.

Best Answer

It sounds to me like you have a 32 bit part of your application, and your trying to run it in a 64bit application pool in IIS. By default the application pool is 64bit on a 64bit OS. To enable 32bit mode you need to go to the advanced properties of the application pool and change the setting for "Enable 32 Bit Applications".

enter image description here