asp.net mvc – HTTP Error 500.19 and error code : 0x80070021

asp.net mvc – HTTP Error 500.19 and error code : 0x80070021

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 dont 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

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. Youll be asked to restart the system.

    Screen

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

asp.net mvc – HTTP Error 500.19 and error code : 0x80070021

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:WindowsSystem32inetsrvconfigapplicationHost.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.

Leave a Reply

Your email address will not be published.