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

The best answers to the question “"The page you are requesting cannot be served because of the extension configuration." error message” in the category Dev.

QUESTION:

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?

ANSWER:

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.

ANSWER:

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

ANSWER:

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>

ANSWER:

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.