This solved my error on Windows Server 2012, IIS 8.5. Should work for other versions too.
- Go to Server Manager, click add Roles and Features
- In the roles section choose: Web Server
- Under Security sub-section choose everything (I excluded digest, IP restrictions and URL authorization as we don't use them)
- Under Application Development choose
.NET Extensibility 4.5
andASP>NET 4.5
, both ISAPI entries - In the Features section choose:
NET 3.5
,.NET 4.5
,ASP.NET 4.5
- In the Web server section choose:
Web Server (all)
,Management Tools (IIS Management Console and Management Service)
,Windows
follow below url
http://serverfault.com/questions/360438/iis-complains-about-a-locked-section-how-can-i-find-out-where-its-locked