HTTP Error 500.19 and error code : 0x80070021
Solution 1
Got precisely the same error and came to this question. As @SpaceBison mentioned in comments, this answer describes the solution - https://stackoverflow.com/a/12867753/404099. I spotted it too late and it misses some steps. This is what worked for me:
Windows Server 2012, IIS 8.5. Should work for other versions too.
- Go to server manager, click add roles and features
- In the roles section choose: Web Server
- Under Security sub-section choose everything (I excluded digest, IP restrictions and URL authorization as we don't use them)
- Under Application Development choose .NET Extensibility 4.5, ASP.NET 4.5 and both ISAPI entries
- In the features section choose: NET 3.5, .NET 4.5, ASP.NET 4.5
- In the web server section choose: Web Server (all), Management Tools (IIS Management Console and Management Service), Windows Authentication - if you are using any of it
Solution 2
I got this error while trying to host a WCF service in an empty ASP.NET application. The whole solution was using .NET 4.5 platform, on IIS 8.5 running on Windows 8.1. The gotcha was to
-
Open up "Turn Windows Features on or off"
-
Go to WCF section under ASP.NET 4.5 advanced services
-
Check HTTP Activation.
-
You'll be asked to restart the system.
This should Fix the HTTP 500.19!
EDIT 11-FEB-2016 Just got an issue on Windows 10 Pro, IIS 10, This time, it was an HTTP 404.0. The fix is still the same, turn on "HTTP Activation" under Windows Features -> .NET Framework 4.6 Advanced Services -> WCF Services -> HTTP Activation
Solution 3
I also was getting the same problem but after brain storming with IIS and google for many hours. I found out the solution.
This error is because some settings are disabled in IIS applicationHost.config
.
Below are the steps to solution:
- Go to
C:\Windows\System32\inetsrv\config\applicationHost.config
and open in notepad -
Change the following key value present in
<section name="handlers" overrideModeDefault="Deny" />
change this value from "Deny" to "Allow"<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
change this value from "Deny" to "Allow"
It worked for me.
Solution 4
If you're running IIS on that computer for the first time, you should try running the ASP.NET IIS registration tool (aspnet_regiis.exe).
Here's how to do that: If you're using .net framework v4, open command prompt as an administrator, and change directory to your .net framework base folder using:
CD C:\Windows\Microsoft.NET\Framework\v4.0.30319
or, if you're using a 64 bit computer, use:
CD C:\Windows\Microsoft.NET\Framework64\v4.0.30319
when you've successfully navigated to the appropriate directory, execute the ASP.NET IIS registration tool using:
aspnet_regiis -i
If you're using a different .NET framework version, simply replace v4.0.30319
with the appropriate folder name.
Hope this helps.
Solution 5
I solved this by doing the following:
WebServer(ISS)->WebServer->Application Development
add .NET Extensibility 3.5
add .NET Extensibility 4.5
add ASP.NET 4.5
add ISAPI Extensions
add ISAPI Filters
Related videos on Youtube
Umar Abbas
Updated on July 08, 2022Comments
-
Umar Abbas almost 2 years
I have a simple webAPI build by Visual Studio 2013. It works well when I run it from VS13 but when I copy the project in local IIS it gives me the following error.
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070021
Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Config File \?\C:\inetpub\wwwroot\APITeslin\web.config
Config Source:
36: <system.webServer> 37: <handlers> 38: <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
-
SpaceBison over 10 yearsThis is likely to be Windows authentication disabled in IIS, but required in your application's web.config.
-
CodeCaster over 10 yearspossible duplicate of IIS - this configuration section cannot be used at this path (configuration locking?)
-
Umar Abbas over 10 years@SpaceBison how can i enable Window Authentication in IIS8 ?
-
Umar Abbas over 10 yearsHere is link of my webconfig file. icopter.co.uk/Webconfig.txt
-
Admin over 10 yearsHave you considered using URL rewrite module?
-
-
Bill almost 10 yearsAll I had to add was the .NET 4.5 items in the AppDev section and the Features section. The extensibility item also forced the 2 ISAPI entries.
-
psulek almost 10 yearsThose steps help me with problem. Thanks.
-
JosephDoggie over 9 yearsI am trying to run two different VS projects on my iis server (virtual machine); one works, one doesn't... The above helped get the first working; is there any reason the 2nd shouldn't work?
-
masterwok over 9 yearsI used this method in the past but aspnet_regiis is no longer supported on Windows 8.1. To register 4.5 use the Programs and Features > Turn Windows features on or off > Information Information Services > World Wide Web Services > Application Development Features > Check ASP.NET 4.5 and whatever else you might need.
-
Alexandru over 9 yearsFinally, a solution to solve my ailments. Thanks, it makes sense, and its simple enough. It always seems to be missing features and roles these days...
-
knocte over 9 yearsthe ServerManager is not available in Windows7 Home, how to fix it?
-
knocte over 9 yearsthis needs to be run as Administrator (right click on cmd.exe icon -> run as administrator), and even it if can detect errors during the operation (and produce a log file), it worked for me!
-
Ilia Barahovsky over 9 years@knocte - in Windows 7 you can enter the "Uninstall or change a program" and then hit "Turn Windows features on or off". This is not the same as the Server Manager, but you can install IIS and related features this way.
-
Sudhanshu Mishra over 9 yearsFor IIS 8.5 on Windows 8.1 (or Windows Server 2012) this does not work. I got the following prompt:C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -i Start installing ASP.NET (4.0.30319.33440). This option is not supported on this version of the operating system. Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog, the Server Manager management tool, or the dism.exe command line tool.
-
Jim about 9 yearsWORKED (didn't have to install 3.5), did have to recycle the app pool for it to take effect. (thx)
-
Djorge almost 9 yearsThis is almost helpful but on IIS 7 there is no "defaultPath" under system.webServer
-
Gurusinghe almost 9 yearsThank you so much @dotnetguy! :-) it worked for me also. The error came when I tried to host Web API 2.2 and MVC on Empty ASP.NET application.
-
silkfire over 8 years@dotnetguy This is exactly what helped me after not being able to get IIS to work with my local MVC application in Visual Studio. Thanks so much. HTTP Activation it is!
-
Sudhanshu Mishra over 8 years@silkfire glad it helped!
-
NEOLPAR almost 8 yearsGreat! It works properly, neither I install .NET3.5.
-
Mido almost 8 yearsBy that he means if you are looking to update Windows Authentication then you will find it in the path system.webServer -> Security -> Authentication.
-
Krisztián Balla almost 8 yearsThank you. After doing these steps the next error appeared. I could solve it like described here: stackoverflow.com/a/30594003/434742
-
PeterVermont over 7 yearsUnder Windows 10 choices were 'ASP', ASP.NET.35.', and 'ASP.NET 4.6'. Checking 4.6 worked for me. Thanks!
-
Heemanshu Bhalla over 7 years@dotnetguy Thanks
-
Rian over 7 years@dotnetguy Got the same exact issue and this solved it! Thanks a lot! You really are a .Net guy! :D
-
Axel over 7 yearsWhere is the Server Manager? I have a PC with Windows 8 and IIS 8.5
-
Apogee about 7 yearsBrilliant, thanks for this. Fixed the same issue for me on Win 10 Pro, VS2015 trying to start an ASP.Net 4.5 MVC application on IIS.
-
Víctor Beltrán almost 7 yearsThanks!! It works for me with IIS 10 and Windows 10 :)
-
Shadi Alnamrouti over 6 yearsResigning from my job is easier than creating a new web.config. Never ever try to do so.
-
jb007 almost 6 yearsThis fixed my issue as well. So the issue was ultimately that after adding IIS to my local machine, I didnt enable to proper features. This resolved it. THnks.
-
ramires.cabral over 5 yearsWorked for me too. But I only need this part "Under Application Development choose .NET Extensibility 4.5, ASP.NET 4.5 and both ISAPI entries". Using Win Server 2016.
-
Vitox over 5 yearsJust installed everything else needed, but still not got it to work. Then, I just installed the URL Rewrite module, and got it working! Thanks!
-
Abhishek Dhote about 5 yearsWORKED!!!! Bang on, after struggling for a day finally got solution, thanks a lot :)
-
Owen Blacker almost 5 yearsThank you. I wish Google had shown me this result several hours earlier 😊
-
themefield almost 5 yearsI think this is the most concise and easy-to-understand answer.
-
Abhijit Mondal Abhi almost 5 yearsWorks fine. The main culprit is HTTP Activation!
-
Lex Li almost 4 yearsIf URL Rewrite is missing, the error code won't be 0x80070021.
-
Lex Li almost 4 yearsIf URL Rewrite module is missing, the error code won't be 0x80070021.
-
David Kroukamp almost 4 yearsHad this happen after an update from Windows 10 update 1909 -> Windows 10 update 2004. Saved me from re-installing windows or hours of troubleshooting
-
Vithu over 3 yearsEnabling All Security did fr me
-
Manuel Castro over 3 yearsThis is the specific solution when working on Windows 8 or 10, solved the problem I was struggling with all day, thanks!
-
Deep Roy almost 3 yearsworked for me, tried the link mentioned (windows 10, VS-19). thanks man
-
Joao71 over 2 yearsworked firts time, thank you so much ! Was struggling with this for the past two hours......