HTTP Error 500.19 and error code : 0x80070021

405,107

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

  1. Open up "Turn Windows Features on or off"

  2. Go to WCF section under ASP.NET 4.5 advanced services

  3. Check HTTP Activation.

  4. You'll be asked to restart the system.

    Screen Shot

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:

  1. Go to C:\Windows\System32\inetsrv\config\applicationHost.config and open in notepad
  2. 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

enter image description here

Share:
405,107

Related videos on Youtube

Umar Abbas
Author by

Umar Abbas

Updated on July 08, 2022

Comments

  • Umar Abbas
    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" />
    
  • Bill
    Bill almost 10 years
    All 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
    psulek almost 10 years
    Those steps help me with problem. Thanks.
  • JosephDoggie
    JosephDoggie over 9 years
    I 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
    masterwok over 9 years
    I 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
    Alexandru over 9 years
    Finally, 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
    knocte over 9 years
    the ServerManager is not available in Windows7 Home, how to fix it?
  • knocte
    knocte over 9 years
    this 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
    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
    Sudhanshu Mishra over 9 years
    For 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
    Jim about 9 years
    WORKED (didn't have to install 3.5), did have to recycle the app pool for it to take effect. (thx)
  • Djorge
    Djorge almost 9 years
    This is almost helpful but on IIS 7 there is no "defaultPath" under system.webServer
  • Gurusinghe
    Gurusinghe almost 9 years
    Thank 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
    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
    Sudhanshu Mishra over 8 years
    @silkfire glad it helped!
  • NEOLPAR
    NEOLPAR almost 8 years
    Great! It works properly, neither I install .NET3.5.
  • Mido
    Mido almost 8 years
    By 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
    Krisztián Balla almost 8 years
    Thank you. After doing these steps the next error appeared. I could solve it like described here: stackoverflow.com/a/30594003/434742
  • PeterVermont
    PeterVermont over 7 years
    Under Windows 10 choices were 'ASP', ASP.NET.35.', and 'ASP.NET 4.6'. Checking 4.6 worked for me. Thanks!
  • Heemanshu Bhalla
    Heemanshu Bhalla over 7 years
    @dotnetguy Thanks
  • Rian
    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
    Axel over 7 years
    Where is the Server Manager? I have a PC with Windows 8 and IIS 8.5
  • Apogee
    Apogee about 7 years
    Brilliant, 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
    Víctor Beltrán almost 7 years
    Thanks!! It works for me with IIS 10 and Windows 10 :)
  • Shadi Alnamrouti
    Shadi Alnamrouti over 6 years
    Resigning from my job is easier than creating a new web.config. Never ever try to do so.
  • jb007
    jb007 almost 6 years
    This 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
    ramires.cabral over 5 years
    Worked 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
    Vitox over 5 years
    Just 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
    Abhishek Dhote about 5 years
    WORKED!!!! Bang on, after struggling for a day finally got solution, thanks a lot :)
  • Owen Blacker
    Owen Blacker almost 5 years
    Thank you. I wish Google had shown me this result several hours earlier 😊
  • themefield
    themefield almost 5 years
    I think this is the most concise and easy-to-understand answer.
  • Abhijit Mondal Abhi
    Abhijit Mondal Abhi almost 5 years
    Works fine. The main culprit is HTTP Activation!
  • Lex Li
    Lex Li almost 4 years
    If URL Rewrite is missing, the error code won't be 0x80070021.
  • Lex Li
    Lex Li almost 4 years
    If URL Rewrite module is missing, the error code won't be 0x80070021.
  • David Kroukamp
    David Kroukamp almost 4 years
    Had 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
    Vithu over 3 years
    Enabling All Security did fr me
  • Manuel Castro
    Manuel Castro over 3 years
    This is the specific solution when working on Windows 8 or 10, solved the problem I was struggling with all day, thanks!
  • Deep Roy
    Deep Roy almost 3 years
    worked for me, tried the link mentioned (windows 10, VS-19). thanks man
  • Joao71
    Joao71 over 2 years
    worked firts time, thank you so much ! Was struggling with this for the past two hours......