Reputation: 203
I've setup a new .net 2.0 website on IIS 7 under Win Server 2k8 and when browsing to a page it gives me a 404.17 error, claiming that the file (default.aspx in this case) appears to be a script but is being handled by the static file handler. It SOUNDS like the module mappings for ASP.Net got messed up, but they look fine in the configurations. Does anyone have a suggestion for correcting this error?
Upvotes: 20
Views: 70321
Reputation: 181
In my case, none of the above answers resolved the issue, and the reason was that the CGI module wasn't installed.
To resolve this I followed these instructions.
https://learn.microsoft.com/en-us/iis/configuration/system.webserver/cgi
Upvotes: 0
Reputation: 1
http activation under WCF Services in turn on / off windows features resolved the issue.
Upvotes: 0
Reputation: 6382
We needed to install ASP.NET 3.5 and 4.5, ISAPI Extensions, ISAPI Filters and Server Side Includes, in the Windows Features menu under IIS Development Features.
Alternatively, do with the command line DISM:
Dism /online /enable-feature /featurename:NetFx3 /All /Source:WindowsInstallers\Win8\sxs /LimitAccess
Dism /online /enable-feature /featurename:NetFx4 /All /Source:WindowsInstallers\Win8\sxs /LimitAccess
Dism /online /enable-feature /featurename:IIS-ISAPIExtensions /All /Source:WindowsInstallers\Win8\sxs /LimitAccess
Dism /online /enable-feature /featurename:IIS-ISAPIFilter /All /Source:WindowsInstallers\Win8\sxs /LimitAccess
Dism /online /enable-feature /featurename:IIS-ServerSideIncludes /All /Source:WindowsInstallers\Win8\sxs /LimitAccess
Upvotes: 0
Reputation: 604
For me it was HTTP Activation was not checked in the server features.
Upvotes: 0
Reputation: 150
Always try "Revert to Parent" in Handler Mappings first.
I was getting 404.17 when trying to run ASP.NET 4.0 in IIS 7.5. I tried all of the above and eventually got the correct Handler Mappings manually set up and the error went away.
Then, on yet another website with the same error, I tried "Revert to Parent" in Handler Mappings and it added 6 *.aspx mappings and everything worked perfectly.
Obviously, you'd have to have the parent configured properly (from the install or otherwise), but this is definitely the first step everyone should take since it is so easy.
Upvotes: 4
Reputation: 61
For me it worked by doing the following
Install ASP.NET
cd %windir%\Microsoft.NET\Framework64/v4.0.30319
aspnet_regiis.exe -i
Hope it works for you..
Upvotes: 6
Reputation: 103
For me this got resolved by setting 32 bit application to true.
Upvotes: 1
Reputation: 505
For me, this worked. Installs machine configuration sections, handlers, assemblies, modules, protocols and lots of other thing to work things properly.
Upvotes: 0
Reputation: 154
%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i
worked for me after getting "An attempt was made to load a program with an incorrect format ..." with the 32 framework
maybe ill save u one more sec googling
Upvotes: 0
Reputation: 31
For me the solution was to click "revert from inherited" from the handler mappings section under the virtual application.
Upvotes: 3
Reputation: 156
Non of the above worked for me. Our server is 64 bit so setting the Application to allow 32 bit applications worked for us:
I think this was because the web application was compiled for 32 bit only.
Upvotes: 0
Reputation: 11
Only one way to solve this problem...
First Installed Windows7 Then Install IIS 7 with all features
And then installed Visual Studio 2008 / 2010
I work on visual studio 2008 and 2010 but I never seen this error before.
I can also try on my friend's PC. And also I solve this error.
Upvotes: 1
Reputation: 12140
So far, none of these solutions have worked for me.
I have found a few other possible solutions (which did not work for me):
Upvotes: 1
Reputation: 12140
For me, my problem came because of a setting in my project's web.config file (and also the solution, once I understood the problem).
In my web.config file, we had these two lines in the system.webServer > handlers area:
<remove name="WebServiceHandlerFactory-ISAPI-2.0" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Notice the alternative handler has the attribute 'preCondition="integratedMode"'. So, I had to change my AppPool to use Integrated instead of Classic for my pipeline mode setting (which is the opposite of what the solutions above told me to do).
Upvotes: 4
Reputation: 121
This solution worked for me... (I've had aspnet_regiis.exe -i do some damage)
http://forums.iis.net/t/1157725.aspx
1. Locate your App Pool and Right Click 2. Select Basic Settings 3. Select your current .Net Framework Version 4.Restart the App Pool
Upvotes: 12
Reputation: 15762
I had this problem on IIS6 one time when somehow the ASP.NET ISAPI stuff was broke.
Running
%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
to recreate the settings took care of it.
Upvotes: 27