Reputation:
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:
What can I do to fix this error?
Upvotes: 315
Views: 564694
Reputation: 492
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) .
Upvotes: 0
Reputation: 30208
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.
Upvotes: 1
Reputation: 371
Set video
to your IIS MIME Type
This solved my problems.
Ref: https://stackoverflow.com/a/8853443/8832133
Upvotes: 0
Reputation: 331
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" />
Upvotes: 0
Reputation: 13393
For Windows Server 2016
Server Manager
formManage
-> Add Roles and Features
Features
pageWCF Services
feature with all subfeaturesNext
and Install
Upvotes: 2
Reputation: 5813
In Windows 8/10, you have to use
Reference: Check the solution of this question for reference
Upvotes: 291
Reputation: 81660
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.
Upvotes: 180
Reputation: 677
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).
Upvotes: 7
Reputation: 5134
I fixed that on my Windows 10:
Go to Control Panel - Programs and Features - Turn Windows features on or off.
Select .NET Framework 4.6 Advanced Services - WCF Services
Check HTTP Activation.
OK done.
Upvotes: 163
Reputation: 6934
Related to Server 2016, I should add:
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
On Server 2016, installing .net and iis out of sequence does not seem to be a problem.
What is more likely to be a problem on Server 2016 is simply that asp.net is not installed on the machine.
Upvotes: 1
Reputation: 737
To add an extension to serve in IIS follow -
Upvotes: 3
Reputation: 6632
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
Upvotes: 8
Reputation: 158
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.
Upvotes: 0
Reputation: 8025
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>
Upvotes: 3
Reputation: 6968
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".
Upvotes: 0
Reputation: 8265
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>
Upvotes: 97
Reputation: 1363
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.
Upvotes: 7
Reputation: 1533
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.
Upvotes: 2
Reputation: 11054
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
Upvotes: 23
Reputation: 1363
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.
Upvotes: 2