ASP.NET IIS 7.5 HTTP 500.21 error

asp.netiis

I am having an issue setting up a local site.

The project is using ASP.NET Framework 4.0 and I have my DefaultAppPool to use 4.0 with Managed Pipeline Mode as Integrated.

This is the error I get:

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

Module  IIS Web Core
Notification    ExecuteRequestHandler
Handler PageHandlerFactory-Integrated
Error Code  0x8007000d
Requested URL   http://localhost:80/default.aspx
Physical Path   C:\Snugabye\Website\default.aspx
Logon Method    Anonymous
Logon User  Anonymous

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".

Under Control Panel -> Programs -> Turn Window features on / off all I see is Microsoft .NET Framework 3.5.1 and nothing regarding 4.0 is there something I am missing?

Best Answer

Did you register .NET with IIS? If not run the following commands:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

You need to do this from an elevated command prompt (...run as admin).