IIS Error: HTTP 500.21 – Internal Server Error
If you have landed on this article, chances are you have run into the same problem I did.
Yes, I am talking about that nasty “HTTP 500.21 – Internal Server Error”.
It all started when I installed Windows Server 2008 R2 and set up IIS7.
After the install I set Framework 4 as the default for the application pools and uploaded my VisualStudio project into the site root folder (inetpub/wwwroot by default). The project had built correctly and ran without any trouble on my local virtual host, but on the new WinServer it refused to run and threw error 500.21.
After checking with a few friends and reading through the forums, it turned out the fix was simple enough.
You need to re-register ASP.NET with this command:
%windir%Microsoft.NETFrameworkv4.0.30319aspnet_regiis.exe -i
*- the Framework version shown here, “v4.0.30319”, will be a different one in your case.
And that is all there is to it. After an IIS restart everything worked straight away.
Good luck!