From here: http://serverfault.com/questions/360438/iis-complains-about-a-locked-section-how-can-i-find-out-where-its-locked

I have this section in my web.config:
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <security>
        <authentication>
            <anonymousAuthentication enabled="true" />
            <windowsAuthentication enabled="true" />
        </authentication>
    </security>
</system.webServer>

IIS7 crashes and complains about the autientication section:

Module AnonymousAuthenticationModule
     Notification   AuthenticateRequest
     Handler    StaticFile
     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".


How to Fix.
1.Open IIS Manager
2.Click the server name in the tree on the left
3.Right hand pane, Management section, double click Configuration Editor
4.At the top, choose the section system.webServer/security/authentication/anonymousAuthentication
5.Right hand pane, click Unlock Section
6.At the top, choose the section system.webServer/security/authentication/windowsAuthentication
7.Right hand pane, click Unlock Section