Monday, January 16, 2012

How to solve Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list in IIS

Fresh install of the OS and Visual Studio and I am trying to run a .Net 4.0 Application. I was able to deploy through Visual Studio 2010 using IIS, but when I went to run I would get the error:

HTTP Error 500.21 - Internal Server Error

Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

Detailed Error Information
ModuleIIS Web Core
Error Code0x8007000d
Requested URLhttp://localhost:80/app/default.aspx
Physical PathC:\inetpub\wwwroot\app\default.aspx
Logon MethodAnonymous
Logon UserAnonymous
Most likely causes:
  • Managed handler is used; however, ASP.NET is not installed or is not installed completely.
  • There is a typographical error in the configuration for the handler module list.
Things you can try:
  • Install ASP.NET if you are using managed handler.
  • Ensure that the handler module's name is specified correctly. Module names are case-sensitive and use the format modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule".
Links and More Information IIS core does not recognize the module. View more information »

So on a hunch and dealing so much with IIS and issues, I decided to reinstall ASP.Net using the command line. Run the command line as admin and type the following:

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

This will reinstall ASP.NET. This should solve your error as it fixed mine