4

I purchase hosting from bigrock When I run simple aspx page this error occured

HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler. Detailed Error Information Module StaticFileModule Notification ExecuteRequestHandler Handler StaticFile Error Code 0x80070032 Requested URL http://demo.com:80/demo/default.aspx Physical Path C:\Inetpub\vhosts\demo.com\httpdocs\demo\default.aspx Logon Method Anonymous Logon User Anonymous Most likely causes:

The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.

Things you can try:

If you want to serve this content as a static file, add an explicit MIME map.
Lingraj Gowda
  • 159
  • 1
  • 1
  • 12

4 Answers4

8

This is because .Net isn't configured correctly in IIS.

I ran into this in Windows Server 8 under IIS - Even after installing .Net 3.5 (and hence 2.0) IIS wasn't configured properly - So the static file handler was trying to handle .aspx requests - Resulting in this error.

The fix is simple:

Launch Command Prompt - Start - cmd.exe cd C:\Windows\Microsoft.NET\Framework64[Dot Net Version] aspnet_regiis -ir You should see output like:

Start installing ASP.NET [Dot Net Version]. ................ Finished installing ASP.NET [Dot Net Version].

At this point if you refresh your page it should work properly.

  • 1
    this problem existing in server how can i fix this ....ineed to contact service providerr or i can fix with other way – Lingraj Gowda Mar 03 '14 at 06:23
  • I think you should talk to your service provider, or you can check your config (IIS) details and Error log – Suvabrata Roy Mar 03 '14 at 06:27
  • I ask them also they told its perfect file running in local perfect but when I put in live its not working – Lingraj Gowda Mar 03 '14 at 07:23
  • Now I need to check you Code as well as IIS Config – Suvabrata Roy Mar 03 '14 at 08:27
  • I have this very problem running a WCF service fom visual studio. I mean, in IIS express, not IIS per se. Any clues, about why this happen on IIS Express and how to fix it? – Ricker Silva Jul 03 '14 at 14:19
  • Are running your Visual studio with administrative privileges ? – Suvabrata Roy Nov 14 '14 at 07:01
  • 1
    We had to migrate some websites from Windows Server 2012 to 2016 and I ran into this issue. This fixed it, though. All of the other websites worked fine (4.0 and newer). For me, this was v2.0.50727 (so C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis -ir) - just to clarify: I had already updated the app pool as in SilverNinja's answer below (in reverse - we had a .net 2 application). – ahwm Jun 13 '17 at 14:37
3

The fix for us was to manually edit the system.webServer/handlers in the IIS configuration editor and replace .NET 2 ISAPI module with .NET 4 ISAPI module.

applicationHost.config Before (system.webServer/handlers)

<add name="AboMapperCustom-396397" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />

applicationHost.config After (system.webServer/handlers)

<add name="AboMapperCustom-356384" path="*" verb="*" modules="IsapiModule" scriptProcessor="c:\windows\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" requireAccess="None" responseBufferLimit="0" />

Essentially it was running the application through the wrong ISAPI module - even though we specified it properly in the App Pool.

We also had to enable the .NET 4 ISAPI module - it had been turned off by a previous admin.

Alternate Solution - Application Pool Misconfigured

We also see this same error when a .NET 2.0 Application (Classic mode) is serving up .NET 4 (Integrated mode) content. Switching the Application Pool from v2.0 to v4.0 fixed the issue. This same issue could also be from Application Pools v1.1 misclassified as v2.0.

Community
  • 1
  • 1
SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
  • The alternate solution worked for me. Didn't check to see what version the app pool defaulted to. – Andy Jul 26 '17 at 15:49
1

A better solution to this issue is generally the following:

WCF mapping are not registered with IIS. Navigate to

"C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation" and execute 

"servicemodelreg -i" to install them manually.
Manish Jain
  • 1,197
  • 1
  • 11
  • 32
0

In my case, the problem was caused by not having the IIS asp.net features installed on my Windows Server 2019.

  1. Go to server manager
  2. add role and feature
  3. server role
  4. webserver(IIS)
  5. web Server
  6. application development
  7. check all the asp and asp.net 4.x checkboxes
  8. apply changes
Felipe La Rotta
  • 343
  • 3
  • 13