311

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?

Eric Leschinski
  • 146,994
  • 96
  • 417
  • 335
  • 1
    the source code would be more helpful rather then the error page – gsharp Dec 08 '10 at 13:38
  • 1
    What part of the source code would you need to see? –  Dec 08 '10 at 13:40
  • 1
    After following the above instruction then also if you getting same error then go through with below link and follow the steps [Click Here](http://winsecondproblems.blogspot.in/2011/01/http-error-4043-not-foundthe-page-you.html) – Raj Mar 05 '13 at 10:31

20 Answers20

283

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

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
JohnOpincar
  • 5,620
  • 3
  • 35
  • 38
  • 248
    I had to check `.NET Framework 4.5 Advanced Services` > `WCF Services` > `HTTP Activation` – Kevin Brydon Mar 21 '13 at 21:54
  • 20
    run this command from an administrator command prompt: "dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation /all", or "dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation45 /all" – Paul Suart Oct 14 '13 at 21:20
  • Just when I got used to running regiis, microsoft goes and changes it up again. Well at least this is much easier - similar change to installing WIF. Now they should add SQL to Turn Windows Features On/Off. – Shawn J. Molloy Apr 04 '14 at 00:52
  • 1
    @KevinBrydon - Thank you very much! Your tip was very helpful to resolve the issue on Windows 2012 R2. – Amil Waduwawara May 13 '15 at 04:53
  • In Windows server 2012 R2, enabling "Http Activation" worked for me. – Dhanuka777 May 20 '15 at 11:42
  • I got this in .Net 3.5 WCF and fixed `.Net Framework 3.5` > `Windows Communication Foundation HTTP Activation` – Nishantha Oct 12 '15 at 07:29
  • 1
    @KevinBrydon That solves it. That is just to awesome to be a simple comment. It has more votes than the actual answer. Maybe you should make this an answer? – José Ramón Dec 07 '15 at 09:24
  • Thanks man! It also fixes the problem with VS refusing to debug the application using local IIS giving an error "unable to start debugging on the web server". Everything works perfectly now! – Maksim Oct 03 '16 at 14:49
  • Doh! Worked for me. Just amazing how much time one can waste on such simple problems. up vote – Yogi Jul 21 '17 at 20:45
  • Missing in Windows Server 2019 (sigh) – Doug Null May 18 '19 at 21:17
  • Perfect. Thanks. – jancha Sep 06 '19 at 21:59
  • The final touch was indeed HTTP Activation. Thank you @KevinBrydon – Nelssen Apr 24 '20 at 12:38
  • @KevinBrydon 9 years later and your comment is still saving many hours of frustration. Thank you! – Dylan Aug 23 '22 at 20:01
179

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.

Cheeso
  • 189,189
  • 101
  • 473
  • 713
Aliostad
  • 80,612
  • 21
  • 160
  • 208
  • 11
    As a matter of fact I did install Visual Studio first and then IIS. I'm currently running "aspnet_regiis.exe -i" command. Hopefully this fixes the error. –  Dec 08 '10 at 13:43
  • 5
    Worked for me as well when I got this error when trying to access a .svc WCF service. – atconway Sep 20 '12 at 12:14
  • Note - for Windows 8 users see the other answer by JohnOpincar below – KyleK Jun 12 '15 at 13:25
  • +1 For anyone else finding this via Search you might find it easier to perform a Repair on the .NET Install instead of attempting to run aspnet_regiis.exe as the path of least resistance and resolves the issue. We're seeing this a lot on boxes that have installed .NET 4.5.2 (via Windows Update) prior to installing the IIS Role, its a bit frustrating because these boxes will show .NET 4 as an option in their app pool, but if your application requires .NET 4.5 like ours does it'll fail with the above message. – aolszowka Sep 29 '15 at 16:01
162

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.

Pang
  • 9,564
  • 146
  • 81
  • 122
Quan Nguyen
  • 5,074
  • 3
  • 24
  • 26
96

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>
Mahmood Dehghan
  • 7,761
  • 5
  • 54
  • 71
  • 2
    1+ it fixed my problem... i was trying to load the `.json` and i was keep getting the OP error and finally I end-up adding the `mimeMap` in my web.config and solved the problem – Nick Kahn Jul 30 '15 at 14:08
  • Do I need to add MIME type for asmx file as well? – Shilpa Soni Aug 22 '15 at 09:01
  • @ShilpaSoni asmx files are asp.net server files (not static content). so you can't and you don't need to download them from client. – Mahmood Dehghan Aug 23 '15 at 19:10
  • 1
    And [here's](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) a map of file extensions to their appropriate mimeType, found from [this](http://stackoverflow.com/questions/7609208/complete-list-of-mime-type-file-extension-mapping) SO question – Nate Anderson Dec 23 '15 at 19:43
  • thanks you this works for yaml for .net framework 4.8 ` ` – Hassaan Raza Now Jun 23 '22 at 06:57
23

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
Daniel
  • 10,864
  • 22
  • 84
  • 115
8

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

Demodave
  • 6,242
  • 6
  • 43
  • 58
7

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).
Jason Hitchings
  • 667
  • 8
  • 10
7

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.

Eric Leschinski
  • 146,994
  • 96
  • 417
  • 335
Ihor B.
  • 1,275
  • 14
  • 17
3

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>

d1jhoni1b
  • 7,497
  • 1
  • 51
  • 37
3

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.
  • 1
    I tested this solution in the case of .ts (Type Script Files) you must declare in the MIME type Typescript fields (.ts) I use text/x.typescript as mime type – freedeveloper Apr 07 '17 at 20:05
2

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.

Leigh
  • 1,495
  • 2
  • 20
  • 42
2

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
Serkan Arslan
  • 13,158
  • 4
  • 29
  • 44
2

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.

Ihor B.
  • 1,275
  • 14
  • 17
1

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.

Jonesome Reinstate Monica
  • 6,618
  • 11
  • 65
  • 112
1

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.

Serj Sagan
  • 28,927
  • 17
  • 154
  • 183
0

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.

hkf
  • 4,440
  • 1
  • 30
  • 44
user1006743
  • 157
  • 1
  • 6
0

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

TomSelleck
  • 6,706
  • 22
  • 82
  • 151
0

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

1)

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

2)

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" />
Quickee
  • 321
  • 1
  • 6
  • 13
0

Set video to your IIS MIME Type

This solved my problems.

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

4b0
  • 21,981
  • 30
  • 95
  • 142
DoubleX
  • 351
  • 3
  • 18
0

I faced the same error on Windows Server 2022 Standard when I dployed wcf service app.For solution I inslatted HTTP Activation (suggested by kevin-brydon) . enter image description here

Yusif Karimov
  • 400
  • 5
  • 8