Let 32 bit of .NET 4.0 Web Application run on 64 bit IIS 6.0(Win2003 x64)
I assume that you have installed both .Net Framework 2.0 and 4.0, and IIS 6.0 is running under 64 bit mode.
Recently, I have to deploy a 32 bit .NET web application onto IIS 6.0 which is running under 64 bit mode.
I created a web site for it, I was sure that I have set ASP.NET version to .Net Framework 4.0;
And added the Wildcard Mapping(see http://weblogs.asp.net/scottgu/archive/2007/03/04/tip-trick-integrating-asp-net-security-with-classic-asp-and-non-asp-net-urls.aspx),
But I was getting a HTTP 404 file not found error for each request.
That was due to 32 bit .NET Web Application cannot run under 64 bit IIS.
To switch IIS 6.0 of Win2003 x64 to 32 bit mode, do the following:
1. Unregister ASP.NET 2.0 and 4.0 from IIS:
a. Open a new command prompt window, type the following command to unregister the version of ASP.NET 4.0:%SYSTEMROOT%\ Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -u
b.Type the following command to unregister the version of ASP.NET 2.0:
%SYSTEMROOT%\ Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -u
2. Switch IIS to 32 bit mode, and then register ASP.NET 2.0 and 4.0:
a. In the command prompt window of previous step, type the following command to enable the 32-bit mode:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1b. Type the following command to install the version of ASP.NET 2.0 and to install the script maps at the IIS root and under:
%SYSTEMROOT%\ Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -ic. Type the following command to install the version of ASP.NET 4.0 and enable it:
%SYSTEMROOT%\ Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i -enable
3. Enable RESTful urls on the newly created virtual directory:
a. Open properties page of the newly created virtual directory, click “Configuration” button:
b. When Application Configuration window pops up, click “Insert” button:
c. Enter “C:\WINDOWS\microsoft.net\Framework\v4.0.30319\aspnet_isapi.dll” as the executable path,
Make sure uncheck “Verify that file exists”;
Hope it helps.
转载于:https://www.cnblogs.com/BFLForever/articles/2029653.html