IIS 8.5 throwing 404.3 errors for ASPX pages - asp.net

I just installed IIS 8.5 on Windows 8.1. I installed it after installing Visual Studio 12 and the 4.5 version of the .NET framework. I created a new site and now I am getting this error:
HTTP Error 404.3 - Not found
The page you are requesting cannot be served because of the extension configuration.
I have seen posts here and elsewhere regarding this error and none of the fixes have worked. I have tried running aspnet_regiis.exe - the correct 64 bit version. I have also installed all the ASP.NET development tools, including the .BET 4.5 Extensibility feature. Still I am getting this error. I haven't found a post yet with a fix I have not tried.
Has anyone fixed this issue a different way?

I know that this question is old but I've managed to solve this issue on Windows Server 2012 without reinstalling anything, so just in case I leave my solution for future reference:
I just went to 'Add roles and features' and in the Features part I checked 'HTTP activation' on '.Net Framework 4.5 Features->WCF Services'.

The solution turned out to be quite simple. I removed IIS completely, rebooted, and installed it again, making sure to include all the Asp.NET development features the second time.
I think that's where I went wrong the first time. I installed IIS without those features and tried to add them in later. It seems like that should work, but it didn't. The total re installation did, though.

404.3 is the MIME type restriction, it means the server is not serving files with an .aspx extension. That's okay, it is not suppose to. But it has to be defined under the Handler Mappings like this:
If there entries are not there, add them.

On IIS 8.5, Open Server Manager, navigate to the Server Roles screen Scroll down the list to the "Web Server (IIS)" --> "Web Server" and check all the options under "Application Development". That should work!

Related

How to add Default.aspx as default document

I have a new Windows Server 2016 with IIS 10.0.
I have a ASP.NET 4.6.2 application with a Default.aspx file.
When I point my browser to the application I get this error:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
I suspect that IIS is not configured for ASP.NET because the Default Document does not include Default.aspx.
I have .Net Framework 4.6.2 as evidenced that I get an error message that is is already installed when I try to install it again.
The application pool lists CLR 4.0, but does not allow me to change it to 4.6.2.
What do I try to get this configured to load my Default.aspx.
When I google I stumble on things that tell me to run stuff from the command line. I am perfectly comfortable running things from the command line but what I am doing is do vanilla that I can't believe I need to do something from the commandline.
[EDIT] Here is what happened when I added Default.aspx as a default document:
There are a few things to try, but all the instructions are a bit to vague for me to follow with confidence. It also seems weird that I would have to run a commandline thing for something so common as getting IIS to use ASP.NET.
[EDIT] Here are the settings for the Default page:
[EDIT] Here is the configuration of the Application Pool:
After going down all kinds of wrong paths I found this link:
https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45
which amounted to getting 4.6 checked on this wizard screen and pressing install. It was confusing because this is under the development category and this is not a development machine.
Note: the hand added Default.aspx caused a conflict so I had to remove it from web.config by hand.
you can see below link where you can find your answer.
https://www.c-sharpcorner.com/UploadFile/francissvk/set-default-page-for-a-website-in-iis421/

IIS 7.5, 8.0, 8.5 HTTP Error 403.14 - Forbidden after clean windows install

I am running a Asp .Net website under IIS 7.5 - win 7, IIS 8.5 - win 8.1. I have 2 development machines witch run it normally.
Steps to recreate the environment
After a fresh install of Win 7 on another machine.
Installed all updates
Added IIS Feature with
.Net extensebility
Asp
CGI
ISAPI Extensions
ISAPI Filters
Registered .Net framework 4.0 with IIS(aspnet_regiis -i/aspnet_regiis -ir)
Added correct application pool to website.
Set the path to bin folder of the project.
in web.config set:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
Aded IIS/IIS_USRS read-Write rights on the specific folder
*Note: I do not need Directory Browsing enabled
The Problem
On all new OS Installs, no mater what win version (7, 8, 8.1, or 10 Preview) I got the same error
****HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.****
If anyone can help because I am running out of places to look for the problem.
*Note - Same setting work fine on 3 development machines with win 7 and server 2008.
If I deploy a Publish it works fine. (Containing .aspx pages)
Thank You
As I said in my comment below the OP I had tried everything on the list of usual suspects. After losing literally days of my life wrestling with this problem, this is what fixed it for me:-
For some reason best know to the malevolent forces of dotNet, publishing my web apps with the setting Precompile during publishing checked (found in the File Publish Options in the Settings tab of the publish dialog in VS 2012) caused certain of the MVC apps to use the wrong handler. It was almost as though IIS "forgot" they were MVC apps.
A small text file called:
PrecompiledApp.config
was created in the root directory of the malfunctioning app.
Deleting this text file and subsequently publishing without the pre-compile setting brought the malfunctioning apps back to normal!
I have not the faintest clue why this option should cause such a detrimental effect, but this seemed to be the cause.
(I also set all the references to the MVC dependencies as "copy local", but this is on the "usual suspect" list of things to do.)
As with most things dotNet related fixing such mysterious problems as these requires days of banging one's head against a wall randomly altering settings until one makes a difference. There is usually no logical reason for, or documented example of, the error in question, and you are just left with voodoo, hearsay and trawling sites like SO for an answer.
Gimme open source software any day...
On windows 8.1, IIS 8.5 i got the same error.
I googled and found this video:
https://www.youtube.com/watch?v=OmQlO0daduE&feature=youtube_gdata
My Default.aspx was Defeult.aspx with an a->e typeo - fixed it. And now it works.
Tho, I get it, it's still a strange error. Maby should have been something like - "Couldn't find any of the default start pages defined in 'Default Document' and with a - how to change link"

404.17 error - requested content appears to be script

I have a similar question to this one;
IIS 7.5
Server 2008
ASP.Net 4.0 web site
The error I get when trying to run the site is this:
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
...
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 hander.
Now here comes the weird part:
THE WEIRD PART
The weird part is that on the develop server -- which is similar in every aspect to the production server -- everything runs smoothly.
Here's a list of things I cannot try, because I don't want to mess with the sever (it hosts many other sites):
Reinstalling .Net
Reinstalling IIS
Reinstalling anything
Running aspnet_regiis
Here's what I did try:
Republishing the site
Restarting the application pool
Changing the application pool to .Net 2.0 and back to .Net 4.0
Switching around between Integrated and Classic pipeline mode
Enabling 32-bit mode
Taking a look at Handler Mappings
Eventually I created a new application pool, and it sort of started working.
Q) "Sort of"?
A) Yes, sort of.
Now the site only works when the (new) app pool is set to .Net 4.0, Integrated,
and the site's Authentication has ASP.NET Impersonation set to Disabled.
Any change to these settings sets the server yelping "404.17" all over again.
Q) What's wrong with that?
A) What's wrong with that is that I NEED ASP.NET Impersonation for the site to function properly.
As always, your guidance is most needed.
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
Usually this error occurs when you have the right IIS version installed to the respective .net framework. If it was a version (not installed) issue then you would have got a different error message. Anyways, I think by now you have resolved your matter, but I like to share some words with anyone else having this problem. These error messages gave me so much headache all last week and I had tried everything.
Best remedy is always to re install the latest .net in latest visual studio. And the important thing to do is uninstall the existing IIS(express or whichever you have) and re install it first. Then download the latest visual studio. This way visual studio installation can easily access you IIS and add the necessary application pool.
As for the error 404.17, it could simply be because the right application pool has not been assigned for the appropriate dot net version. If the right version is not there re installing visual studio is the only way I know. Also, I think you can try downloading another version of the Visual Studio too. For eg, download the ultimate if you have professional or vice versa. Hope this helps someone with similar problem.
Installing this windows server feature http activation is, what was missing for me.

Unable to run website with ASP.Net version 1.1; while 4.0 works

ASP.Net application (Version 1.1) that was working fine in live environment.
I encountered a problem all of a sudden that some of the functionalities stopped working. I tried simulating the problem in test environment. I found it is with ASP.Net version under IIS -> Websites -> Mywebsite -> properties -> asp.net tab -> asp.net version. Changing that version from 4.0.xxxx to 1.1.xxxx worked.
But when i did the same in live, it isn't.
I tried browsing the page and i get the message saying "page cant be found".
I ran "C:\Windows\Microsoft.Net\Framework\v1.1.xxxx\aspnet_regiis -u" first C:\Windows\Microsoft.Net\Framework\v1.1.xxxx\aspnet_regiis -i after that.
Once this registration is over, I checked the asp.net version in the iis for Mywebsite, it got changed back to 4.0.xxxxx I really dont know why it's happening.
I could access the pages with 4.0.xxxxx but i will need them to be accessed with 1.1.xxxx
Can someone throw some light please?
Environment: Windows Server 2003
I got the answer!
It was happening due to some microsoft patch updates. That turned web service extensions for asp.net 1.1 to be blocked.
I followed the below steps to get it working!
Go to IIS (The version i use is 6.0)
Expand Machine Name
Click Web Service Extensions
At the right side i could see the available .Net frameworks. Right click ASP.Net v1.1.4322 > Allow. That's it. Problem solved.

Script not served by static file handler on IIS7.5

I've just tried to deploy my first web application to IIS on my Windows 7 Home Premium notebook. After creating the application, I had to change to the Classic App Pool, then set that pool for framework 4.0. Now I get the following error:
HTTP Error 404.17 - Not Found The requested content appears to be
script and will not be served by the static file handler.
The requested URL is http://localhost:80/pvmms/default.aspx
I'm afraid extensive Googling has yielded nothing clear or definite enough for me to work with and as usual I've turned to the experts.
EDIT:
I suspect this is because there are no framework 4.0 handler mappings for .aspx files. However, aspnet_regiis even gives my admin user the finger and says I need admin rights to run it.
EDIT #2:
I registered all the frameworks (2 & 4, 32 and 64) and all now works. I found this by manually adding a script map for .aspx to aspnet_isapi and voila. I don't understand why the installation of the framework doesn't do this, unless my memory fails me and I only enabled IIS after installing VS.
Maybe too late now, but more often than not you need to run
aspnet_regiis.exe -i
after installing asp.net. Maybe I would do it anyway now.
In addition to above, if you need WCF support, you might need to run this:
c:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe -i
Replace v3.0 to whatever your current framework version is.
I encountered this error from IIS 8.5 when trying to access a WCF service I had written. Turns out the server didn't have the WCF HTTP Activation features turned on. Checked the boxes and clicked through the wizard, iisreset, started working.
If you are using iis 7.5.
Just go to IIS Manager, open your website properties.
You will see 'Handler Mappings' section there, just go to that section and Search for 'staticFile'.
Most probably its a last file in the list.
Then Right Click on it and Select 'Revert To Parent'.
I have wasted so many hours while i have faced this first time, anyways this will solve your problem.
I had this issue with Windows Server 2012 with ASP .NET 4.5 you can't use aspnet_regiis.exe, and just have to install ASP .NET 4.5 via the Add Roles and Features Wizard:
You can find the menu item "Add Roles and Features" in the menu "Manage", in the right corner of Server Manager
should check out this option i suppose
I solved this problem by enabling WCF Services
Programs and Features > NET Framework 4.5 Services > WCF Services> HTTP Activation node
But you have to admit it guys this ENTIRE IIS setup configure/guess/trial and see/try this/try that spends 4 or 5 of our days trying to find a solution around approach IS A COMPLETE AND UTTER JOKE.
SURELY, 'IIS' IS THE BIGGEST CONFIDENCE TRICK EVER PLAYED ON MANKIND TO DATE
I know this is an old question, but I've just had this with a 3.5 application on my rebuilt Windows 8 machine and I was still getting this after aspnet_regiis -iru and it turned out the be ASP.NET 3.5 wasn't ticked within Application Development Features (not enough reputation to post an image).
There is a chance that application pool created for you application by default is version 2. So although you see a handler for .svc extension in the list it does not work and treat it as static file. All you need is to open application pool properties and switch it to version 4.
Register asp.net again....will solve the issue.
Go to Visual Studio Command Prompt, And register asp.net as windows\microsoft.net\Framework[.Net version num]\aspnet_regiis.exe -i
I had this same issue on a windows 8 machine I am setting up. I had installed vs2012 before vs2010, which installs .NET framework 4.5. I have my app pools running in 4.0. I made sure I had aspnet registered for 4.0 using aspnet_regiis -i. That still didn't do the trick. Then I opened up the Windows Features and noticed that 4.5 added a set called ".NET Framework 4.5 Advanced Services". I enabled the WCF Service node and its children and then my svc endpoint operated correctly. Hope this helps folks who are making the move to Windows 8.
I stumbled upon this question when I ran into the same issue. The root cause of my issue was an incorrectly-configured app pool. It was set for 2.0 inadvertently, when it needed to be set to 4.0. The answer at the following link helped me uncover this issue: http://forums.iis.net/t/1160143.aspx
For Windows 10/Framework 4.7, I had to turn on HTTP Activation through the following method:
Control Panel > Programs and Features > Turn Windows Features on or off
Under .NET Framework 4.7 Advanced Services, expand WCF Services, select to check the HTTP Activation and whatever else you need when working with WCF
Click OK and let the install do its thing, then open an administrative command prompt and issue the IISRESET command
cmd -> right click -> Run as administrator
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
For other people reading this:
This can happen is if the .Net version that you have registered isn't the one selected under the 'Basic Settings' of the application pool attached to your website. For instance, your sites application pool has .Net v2.0 selected but you registered v4.0
Just another possible solution I found having the same error message.
When trying to setup a .NET 4.0 web application to a new applicition pool I was receiving this strange error telling me it was trying to process my aspx file with the static file handler, which didn't make sense.
For some reason the ISAPI for .NET 4.0 was set to disabled in the ISAPI and CGI Restrictions area of the server level in the IIS manager. Setting it to enabled was all that was required, however the IIS 7.5 manager is so convoluted and hard to follow it took me a long time to figure this out.
I'm guessing that since it was a 4.0 Application that could not be processed by the 4.0 Engine the static file handler was being used by default.
I had the same problem. When I added Static content feaute for IIS, It works fine.
it could be multiple reason, in my case under Application pool->advance setting->Enable 32 bit application (should be true).It was set to false before.
Using IIS manager, I found that .aspx files were mapped (under "Handler Mappings") to ISAPI 2.0 - even though ASP.NET 4.5 had been previously installed. Editing them to point (also) to an executable for ISAPI 4.0 64bit fixed the issue.
The executable was found in
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll
i received this message for an application on iis 7.5 with a classic app pool assigned to .net 2.0. i needed to go to Handler Mappings and add two script maps, both were the same with except for the name. one name was svc-ISAPI-2.0-64, the other was svc-ISAPI-2.0. The request path was .svc. And the Executable was %SystemRoot%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll. i restarted iis and all was happy
One of the worst case scenario I just solved is - having conflicting entry in Web.config.
On my local machine I didn't had .woff extension registered in IIS, so I added it using Web.config. But on production server .woff had mime type registered. This caused application level conflict.
Funny part is there are no error logged for this. Just a guess work (first time of course).
So for me solution was just to remove and/or elements from web.config.
I had the same issue, I just changed the target framework version on the website to the version it is developed in,Same in IIS. This solved my problem. Hope this helps...
Thank You

Resources