How do I fix 404.17 error on Win Server 2k8 and IIS7

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?

Answers


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.


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 

For me it worked by doing the following

Install ASP.NET

cd %windir%\Microsoft.NET\Framework64/v4.0.30319
aspnet_regiis.exe -i
  • Next Go to IIS Manager and click on the server (root) node.
  • In features view, IIS section, open "ISAPI & CGI Restrictions"
  • Right-click the ASP.NET 4 restriction column and right-click to Allow

Hope it works for you..


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).


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.


For me the solution was to click "revert from inherited" from the handler mappings section under the virtual application.


So far, none of these solutions have worked for me.

I have found a few other possible solutions (which did not work for me):


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.


For me this got resolved by setting 32 bit application to true.


Non of the above worked for me. Our server is 64 bit so setting the Application to allow 32 bit applications worked for us:

  • Go to Web Server\Application Pools
  • Right click the application pool used by your website.
  • Click on Advanced Settings...
  • Set "Enable 32-Bit Applications" to True.

I think this was because the web application was compiled for 32 bit only.


%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


For me, this worked. Installs machine configuration sections, handlers, assemblies, modules, protocols and lots of other thing to work things properly.


For me it was HTTP Activation was not checked in the server features.


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

http activation under WCF Services in turn on / off windows features resolved the issue.


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://docs.microsoft.com/en-us/iis/configuration/system.webserver/cgi


Need Your Help

How to impersonate another user?

c# asp.net impersonation windows-identity advapi32

I'm working on an ASP.net app and i'm trying to impersonate a user