HTTP Error 500.21 – Internal Server Error, Solution

HTTP Error 500.21 – Internal Server Error
Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

I received above error when I tried to include my ASP.NET application into IIS 7 and browse it. This because of the handlers missing for specific version of Microsoft Dotnet Framework in your IIS 7. I had installed visual studio 10.0 and later I installed IIS 7 So IIS did not pick up all the handlers required for running application built in ASP.NET 4.0 or .NET 3.5 framework. Every time I browse any page of the application from IIS it shows only error with index 500.21, 500.19 ..

Now here is solution you can try out,
Step 1: Check the Control Panel->Programs->Windows features on or off (This is in your WINDOWS 7  OPERATING SYSTEM)
Step 2: Ones you see list of all features in the popup check for Internet Information Services features and should have check-box enabled for ASP.NET.
Step 3: You can now try the following command on your Visual Studio command prompt,

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

Note: Make sure you opened the command prompt using ‘Run as Administrator’. While doing above operation you should close all instances of Visual Studio IDE, tools.

This will add all handlers in IIS 7 and try browsing the page you should get the page without error.
You should also check that your application pool is targeted to use appropriate framework version.

Happy troubleshooting..

Number of View :7736
  1. No comments yet.

Content Protected Using Blog Protector By: PcDrome.