"The page you are requesting cannot be served because of the extension configuration." error message

asp.netIis

asp.net Problem Overview


I'm getting this error message when trying to run my application. I don't know how to fix it:

> HTTP Error 404.3 - Not Found The page > you are requesting cannot be served > because of the extension > configuration. If the page is a > script, add a handler. If the file > should be downloaded, add a MIME map.

Here's a screenshot of the error page: alt text

What can I do to fix this error?

asp.net Solutions


Solution 1 - asp.net

In Windows 8/10, you have to use

  • Open Control Panel →
  • Programs and Features →
  • Turn Windows features on or off →
  • Internet Information Services (IIS) →
  • World Wide Web Services →
  • Application Development Features →
  • Check the appropriate items, such as enabling ASP.NET. (i.e install the appropriate version you want to configure your websites with)

Reference: Check the solution of this question for reference

Solution 2 - asp.net

Use aspnet_regiis.exe to register version of .NET framework you are using.

This is a common issue and happens when IIS is installed after VS or .NET framework.

Note - for Windows 8/10 users, see the other answer by JohnOpincar below. And also the comment/tip from Kevin Brydon.

Solution 3 - asp.net

I fixed that on my Windows 10:

  1. Go to Control Panel - Programs and Features - Turn Windows features on or off.

  2. Select .NET Framework 4.6 Advanced Services - WCF Services

  3. Check HTTP Activation.

  4. OK done.

Solution 4 - asp.net

In my case I needed to add MIME types for each file extension that I wanted to serve to web config:

<system.webServer>
    <staticContent>
      <mimeMap fileExtension=".shp" mimeType="application/octet-stream" />
      <mimeMap fileExtension=".dbf" mimeType="application/octet-stream" />
      <mimeMap fileExtension=".kml" mimeType="text/xml" />
    </staticContent>
    ...
</system.webServer>

Solution 5 - asp.net

In case this helps anyone, I was getting this error when attempting to run aspnet_regiis.exe:

> Operation failed with 0x8007000B > > An attempt was made to load a program with an incorrect format

As it turns out, the server was running 2008 64 bit and I was trying to run the 32 bit version of the utility. Running the version found in \Windows\Microsoft.NET\Framework64\v2.0.50727 fixed the issue.

c:\Windows\Microsoft.NET\Framework64\v2.0.50727>aspnet_regiis.exe -i

Solution 6 - asp.net

I've just had the same situation with my customer. We have our own product which installs a web site. The installer configures everything: the IIS pool, the site, web.config, etc.

We installed another web site using our installer. We entered the same parameters, so web.configs happened to be the same in both sites.

However, the newly installed site worked fine, while the old one didn't. Then I opened 2 IIS Manager windows and started comparing the difference in web site settings. And I found a problem.

Somebody deleted all the Handler Mappings with the old site. If you go to "Handler mappings", you should see there aspx, asmx and other extensions and names of the handlers. So, in the old site all those records were missing.

So, I would suggest first to check the "Handler mappings" - there must be a lot of records there. Create a new web site and compare to know how many should there be.

Who deleted them, a person or another program, I have no idea. If somebody can tell if there exists some tracking application which would tell that user domain\john was modifying web site at date "07.03.2012 12:34" that would be useful.

Solution 7 - asp.net

I fixed my issue on Windows 2012 server by Installing ALL WCF Features.

A) Server Manager > Manage[link top left] > Add Roles and Features

B) In Features > .Net Framework 4.5 Features > WCF Services

C) Check (enable) the features. I checked all.

D) Install

Solution 8 - asp.net

Running Windows Server 2008 R2 64bit and .net framework 4.5, ran this command from this location, and was successful:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis -i

output:

Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation.  All rights reserved.
Start installing ASP.NET (4.0.30319.0).
.....
Finished installing ASP.NET (4.0.30319.0).

Solution 9 - asp.net

As @Mahmoodvcs mentioned i was require to set/add MIME types for the file extension that I needed to host/download directly, in this case is a Heroku's dump file (postgres's database backup), so in order to set a public IIS server where you can download this files without requiring AWS S3 bucket or HTTP shares like dropbox this is a terrific option!

<staticContent>
  <mimeMap fileExtension=".dump" mimeType="application/octet-stream" />
</staticContent>

Solution 10 - asp.net

By the way, I've just found out this post: http://blogs.msdn.com/b/webtopics/archive/2010/03/19/iis-7-5-how-to-enable-iis-configuration-auditing.aspx it explains how to audit changes on IIS. For those who face similar problems I suggest to turn on auditing and later see why your site stopped working.

Solution 11 - asp.net

I too had this error, on Windows Server 2008 IIS 7, I had no visual studio installed so a reinstall / repair of .NET 4.0 did the trick.

Solution 12 - asp.net

To add an extension to serve in IIS follow -

  1. Open IIS Manager and navigate to the level you want to manage.
  2. In Features View, double-click MIME Types.
  3. In the Actions pane, click Add.
  4. In the Add MIME Type dialog box, type a file name extension in the File name extension text box. ... Type a MIME type
  5. in the MIME type text box.
  6. Click OK.

Solution 13 - asp.net

For Windows Server 2016

  1. Open Server Manager form
  2. Manage -> Add Roles and Features
  3. Next until Features page
  4. Check WCF Services feature with all subfeatures
  5. Next and Install

Solution 14 - asp.net

Related to Server 2016, I should add:

  1. Run this command: aspnet_regiis -lv from this dir: C:\Windows\Microsoft.NET\Framework\v2.0.50727\ This gives you the best view of what is going on

  2. On Server 2016, installing .net and iis out of sequence does not seem to be a problem.

  3. What is more likely to be a problem on Server 2016 is simply that asp.net is not installed on the machine.

Solution 15 - asp.net

If you are trying to view an extensionless file what worked for me was adding a MIME Type: File name extension: . MIME type: text/plain

This might have some MVC implications, especially if your Static File Handler is above the Extensionless... handlers (under IIS / Handler Mappings) but might be a work around when you only need this temporarily, like activating SSL Certs.

Solution 16 - asp.net

Verify that the application pool in IIS (in the case of IIS7 or above) is selected as integrated. In this case, probably change to Classic can solve this problem.

Solution 17 - asp.net

I was trying to set up MediaWiki on my windows 7 pc and got this error.

My solution was to "create a global FastCGI handler mapping for php".

Solution 18 - asp.net

PHP 7.3 Application IIS on Windows Server 2012 R2

This was a two step process for me.

  1. Enable the WCF Services - with a server restart

  2. Add a FASTCGI Module Mapping

Go to Server Manager > Add roles and features Select your server from the server pool Go to Features > WCF Services I selected all categories then installed

Go to IIS > selected the site In center pane select Handler Mappings Right hand pane select Add Module Mappings

Within the edit window:

Request path: *.php

Module: FastCgimodule

Executable: I browsed to the php-cgi.exe inside my PHP folder

Name: PHP7.3

Now that I think about it. There might be a way to add this handler mapping inside the web-config so if you migrate your site to another server you don't have to add this mapping over and over.

EDIT: Here it is. Add this to the section of the web-config.

<add name="PHP-FastCGI" verb="*" 
  path="*.php" 
  modules="FastCgiModule"
  scriptProcessor="c:\php\php-cgi.exe" 
  resourceType="Either" />

Solution 19 - asp.net

Set video to your IIS MIME Type

This solved my problems.

Ref: https://stackoverflow.com/a/8853443/8832133

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiondeleteView Question on Stackoverflow
Solution 1 - asp.netJohnOpincarView Answer on Stackoverflow
Solution 2 - asp.netAliostadView Answer on Stackoverflow
Solution 3 - asp.netQuan NguyenView Answer on Stackoverflow
Solution 4 - asp.netMahmood DehghanView Answer on Stackoverflow
Solution 5 - asp.netDanielView Answer on Stackoverflow
Solution 6 - asp.netIhor B.View Answer on Stackoverflow
Solution 7 - asp.netDemodaveView Answer on Stackoverflow
Solution 8 - asp.netJason HitchingsView Answer on Stackoverflow
Solution 9 - asp.netd1jhoni1bView Answer on Stackoverflow
Solution 10 - asp.netIhor B.View Answer on Stackoverflow
Solution 11 - asp.netLeighView Answer on Stackoverflow
Solution 12 - asp.netShahadat Hossain KhanView Answer on Stackoverflow
Solution 13 - asp.netSerkan ArslanView Answer on Stackoverflow
Solution 14 - asp.netJonesome Reinstate MonicaView Answer on Stackoverflow
Solution 15 - asp.netSerj SaganView Answer on Stackoverflow
Solution 16 - asp.netuser1006743View Answer on Stackoverflow
Solution 17 - asp.netTomSelleckView Answer on Stackoverflow
Solution 18 - asp.netQuickeeView Answer on Stackoverflow
Solution 19 - asp.netDoubleXView Answer on Stackoverflow