Monday, July 4, 2011

Fixing the error: Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

In trying to setup a site on a Windows 2008 server, I ran into the following error message

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

Searching the forums suggested running aspnet_regiis.exe with the -i option.
Running aspnet_regiis resulted in an error, the details of which could be found in a log file it generates. The log file had the following message

Failure Changing IIS ApplicationHost.config: IIS7Register failed with HRESULT 800700b7: 'Cannot create a file when that file already exists

I was able to fix the above error following the steps outlined in this blog article. The article recommends replacing %windir% with the absolute path "C:\Windows" in isapiCgiRestriction section of \windows\system32\inetsrv\config\applicationHost.config for .NET 4.0. The replacement is not required for .NET 2.0. Strange, but it worked. Running aspnet_regiis.exe after making this change resulted in successful execution and also fixed the "bad module" error!!

3 comments:

nucleus said...

Thanks! It very helpful

Klaus Byskov said...

Thank you SO much!

Joe Hamilton said...

I tried this on Windows 8.1 with no luck. Any ideas?

What is success?

The journey of life takes us through varied experiences like landing an admission at a prestigious college, earning a degree, getting hired,...