views:

589

answers:

3

I was developing an ASP.NET MVC web app on Windows XP and Visual Studio 2008 (using the Visual Studio web server). I recently installed Windows 7 64 bit Ultimate edition, IIS 7.5 and migrated my app using appcmd.

If I set the flag enable32BitAppOnWin64 == false on my application pool my application works fine. As soon as I set it to true (since I want it to run in 64 bit) it throws this exception:

Screen Shot of error

HTTP Error 500.0 - Internal Server Error
Calling LoadLibraryEx on ISAPI filter "C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_filter.dll" failed

If I go and delete all ISAPI filters but leave ASP.Net_2.0.50727-64 then this error goes away.

How do I resolve this?

A: 

It sounds like you need some 64 bit ISAPI filters.

32 bit DLL's will not run on a 64 bit machine unless you sprinkle some magic pixie dust on them. This is why the enable32BitAppOnWin64 flag exists.

Set the flag to true and bask in the glory of the pixie dust.

Robert Harvey
But I think I have 64 bit ISAPI filter that is in my framework64 directory thats what being pointed by ASP.Net_2.0.50727-64
Mohit
A: 

It sounds like the Handler Mapping preConditions for your site are a bit messed up. In IIS MMC browse to the site and open the Handler Mappings feature. In the Actions pane on the right, click the 'Revert To Parent' link.

Kev
A: 

Your key is in the path mentioned in the error:

"C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll"

Notice there is an extra slash in the path. At an elevated command prompt, navigate to ../Framework/v2.0.50272 directory and run the following command:

aspent_regiis -r

Alternatively, use IIS to modify the correct path of the filter.

So no magic dust needed...you just need to to register the right path. :)

Rob Smith