Today I installed Clean Windows Web Server 2008 R2 64-bit with IIS 7.5. To my surprise opening .NET 4.0 application I received the following error:
IIS 7.5 Detailed Error - 500.21 - Internal Server Error
Server Error in Application "DEFAULT WEB SITE"
Internet Information Services 7.5
[Error Summary]
HTTP Error 500.21 - Internal Server Error
Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list
[Detailed Error Information]
Module IIS Web Core
Notification ExecuteRequestHandler
Handler PageHandlerFactory-Integrated
Error Code 0x8007000d
Requested URL http://localhost:80/default.aspx
Physical Path C:\inetpub\wwwroot\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".
[Links and More Information]
IIS core does not recognize the module.
View more information »
As it turns out, some glitch caused this problem, and somehow .NET was not registered with IIS.
Running the following commands solved this issue:
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

Hi, Thank you for this post, it is very helpful I deployed my website and its working perfectly
Any other ideas this did not work for me.
Jeff,
You may need to change ‘v4.0.30319′ to your installed .NET version
Great Hint, works perfectly. Thanks!
Michael
That worked for me too – thanks.
Thanks its worked for me
this worked for me (using .netv4 with iis7 and win 7).
it’s working perfect.
thanks~
i am getting the same error but the tip didn’t work and the version is the same. any other ideas on what this could be?
thank you!
Many thanks it worked perfect.
Thanks very much for this perfect line. It’s work perfect for my anf save my time and my work.
100000000000000000000000 thanks.
This was great help. It solved my problem easily (I had to run command line as admin), but that was easily fixed.
Thanks!!!! Save my day…..
Work like a charm!!
100% right, I was forgetting the x64 path.
If this doesnt work, try a reboot and try again. That did it for me.
Thanks for this posting. It’s very important now my web server is fix. I can lounge my web site.
Thanks,
As if learning all this crap isn’t hard enough without stupid things like this popping up left and right. Thank you very much for posting this
Thanks.
worked !
Ohhhhh Bigggg Thank you Very much very very much
Still no luck for me. I have tried all these and same old error.
Anybody??
with %windir% it did not work for me. But as I took the complete Path (C:\Windows\…\aspnet_regiis.exe) it worked pretty well.
So thanks a lot!
your fix worked for me. Thanks a lot.
The error message is lousy
Hi guys
I cant seem to get this problem resolved. I did solve it, the first time before I reinstalled IIS, now its back again , and I notice the solution is for IIS 7 , Win 7 and VS 2010 / .NET 4. I also have 2010, but I’m working on VS2008 which means .NET 3.5, so is there any other way around this
This worked for me!! Thank you so much! <3
Will
Ey thanX a lot it worked perfect!!
Thanks, that did the trick.
Thank you very much! I have been searching around for an hour looking for a solution to this issue.
Like a boss. Thanks!
Thanks dear
A simple fix, thank you kindly!
Of the 4 development servers I have, 1 decided not to register .NET with IIS 7.5. I was given the grand tour of the Microsoft campus, again, courtesy of the MSDN web site. All I wanted was a simple answer for a simple question and wound up clicking one link after another on MSDN. Should’ve googled it out of the gate . . . but nooooo,!
I’ve bookmarked your site and will gladly recommend you to all! Thanks again
David
Great Post – Many thanks!
Works! Thank you
Thank you very much it worked for me as well.
I had to run it twice though because the first time it gave me an error. The second time I run it, it did give me an error also but in a different section which did not error out the first time, then restated IIS and viola!
Thanks for your post, you just helped me get past this issue within a minute of running into it.
Hi guys, i am getting this error and i was trying to understand what trick u guys used to solve it but i cudnt…………pls care to explain what i need to do. Thanks.
in my machine
for this path->%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
aspnet_regii.exe does not exit,why?
Hi all
For those that have tried the above above and still no luck, try changing the managed pipeline mode to classic. In IIS 7.5 click on ‘Application Pools’ then double click the relevant application pool in the right hand window. Change the ‘Managed Pipeline Mode’ drop down box to ‘Classic’ and click ‘OK’.
Sorted it for me, hopefully it helps.
Thanks
Mat
Very tks man, fast solution
Thanks for the tip – it worked perfectly for me!
It Worked for me 2. Thanks a lot.
Thank you so much! it solved my problem.
Thanks, It also working for me.
Thanks it is all working..
Thank you! I always forget about this step when setting up a new server.
I dont have any “framework” folder in Microsoft .Net folder
i installed framework 4 on my pc, i downloaded it and when i wanted to install ” repare or remove ” appeared !
it means i have installed it.
woot! Thanks!
Thanks, u rock!
It works!! Thank you so much
thanx a lot after so much effort i cudnt deploy it bt after reading ur post i cud successfully deploy my website