HTTP Error 500.21 - Internal Server Error

1

While trying to run my application hosted in IIS, its giving me following error.

Module  IIS Web Core
Notification    BeginRequest
Handler Not yet determined
Error Code  0x80070021
Config Error    This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Config File \\?\C:\inetpub\wwwroot\Planner\web.config

After googling i found some suggestion, i tried to run the following comment in command prompt it got unlocked.

%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/handlers -commitpath:apphost

Now i am getting the following new error.

Module  IIS Web Core
Notification    ExecuteRequestHandler
Handler BlockViewHandler
Error Code  0x8007000d
Requested URL   http://localhost:80/Planner/Views
Physical Path   C:\inetpub\wwwroot\Planner\Views
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.

Any help please?

Thanks in advance.

asp.net-mvc
iis
asked on Stack Overflow May 30, 2014 by user1845163 • edited Aug 1, 2014 by tereŇ°ko

1 Answer

11

I have the same error on windows 7 when testing my new website with .Net 4. The cause of this problem is that your .Net is not registered with your IIS. To solve this error I run CMD as administrator and run this simple command in it:

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

After registering IIS with .Net 4 my problem solved.

answered on Stack Overflow Dec 23, 2014 by Sarmen Tavoosi

User contributions licensed under CC BY-SA 3.0