500.21 Bad module "ManagedPipelineHandler" in its module list

Solution 1:

Please follow these steps:

1) Run the command prompt as administrator.

2) Type either of the two lines below in the command prompt:

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

or

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

Solution 2:

I ran into this error on a fresh build of Windows Server 2012 R2. IIS and .NET 4.5 had been installed, but the ASP.NET Server Role (version 4.5 in my case) had not been added. Make sure that the version of ASP.NET you need has been added/installed like ASP.NET 4.5 is in this screenshot.

ASP.NET Server Role

Solution 3:

To fix the problem, I tried to run

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

However It didn't work for me. I have to run another command line in CMD window as administrator. Here is the command:

dism /online /enable-feature /featurename:IIS-ASPNET45

or

dism /online /enable-feature /featurename:IIS-ASPNET45 /all

Hope it will help.

Solution 4:

Try switching to Integrated mode. See the following thread:

IIS 7, HttpHandler and HTTP Error 500.21